@@ -205,7 +205,7 @@ describe('passportLocalMongoose', function() {
205
205
206
206
describe ( '#changePassword() callback' , function ( ) {
207
207
beforeEach ( dropMongodbCollections ( connectionString ) ) ;
208
- beforeEach ( ( ) => mongoose . connect ( connectionString , { bufferCommands : false , autoIndex : false , useNewUrlParser : true } ) ) ;
208
+ beforeEach ( ( ) => mongoose . connect ( connectionString , { bufferCommands : false , autoIndex : false , useNewUrlParser : true , useUnifiedTopology : true } ) ) ;
209
209
afterEach ( ( ) => mongoose . disconnect ( ) ) ;
210
210
211
211
it ( 'should change password' , function ( done ) {
@@ -282,7 +282,7 @@ describe('passportLocalMongoose', function() {
282
282
283
283
describe ( '#changePassword() async' , function ( ) {
284
284
beforeEach ( dropMongodbCollections ( connectionString ) ) ;
285
- beforeEach ( ( ) => mongoose . connect ( connectionString , { bufferCommands : false , autoIndex : false , useNewUrlParser : true } ) ) ;
285
+ beforeEach ( ( ) => mongoose . connect ( connectionString , { bufferCommands : false , autoIndex : false , useNewUrlParser : true , useUnifiedTopology : true } ) ) ;
286
286
afterEach ( ( ) => mongoose . disconnect ( ) ) ;
287
287
288
288
it ( 'should change password' , async ( ) => {
@@ -334,7 +334,7 @@ describe('passportLocalMongoose', function() {
334
334
describe ( '#authenticate() callback' , function ( ) {
335
335
336
336
beforeEach ( dropMongodbCollections ( connectionString ) ) ;
337
- beforeEach ( ( ) => mongoose . connect ( connectionString , { bufferCommands : false , autoIndex : false , useNewUrlParser : true } ) ) ;
337
+ beforeEach ( ( ) => mongoose . connect ( connectionString , { bufferCommands : false , autoIndex : false , useNewUrlParser : true , useUnifiedTopology : true } ) ) ;
338
338
afterEach ( ( ) => mongoose . disconnect ( ) ) ;
339
339
340
340
it ( 'should yield false in case user cannot be authenticated' , function ( done ) {
@@ -511,7 +511,7 @@ describe('passportLocalMongoose', function() {
511
511
describe ( '#authenticate() async' , function ( ) {
512
512
513
513
beforeEach ( dropMongodbCollections ( connectionString ) ) ;
514
- beforeEach ( ( ) => mongoose . connect ( connectionString , { bufferCommands : false , autoIndex : false , useNewUrlParser : true } ) ) ;
514
+ beforeEach ( ( ) => mongoose . connect ( connectionString , { bufferCommands : false , autoIndex : false , useNewUrlParser : true , useUnifiedTopology : true } ) ) ;
515
515
afterEach ( ( ) => mongoose . disconnect ( ) ) ;
516
516
517
517
it ( 'should yield false with error message in case user cannot be authenticated' , async ( ) => {
@@ -653,7 +653,7 @@ describe('passportLocalMongoose', function() {
653
653
654
654
describe ( 'static #authenticate() callback' , function ( ) {
655
655
beforeEach ( dropMongodbCollections ( connectionString ) ) ;
656
- beforeEach ( ( ) => mongoose . connect ( connectionString , { bufferCommands : false , autoIndex : false , useNewUrlParser : true } ) ) ;
656
+ beforeEach ( ( ) => mongoose . connect ( connectionString , { bufferCommands : false , autoIndex : false , useNewUrlParser : true , useUnifiedTopology : true } ) ) ;
657
657
afterEach ( ( ) => mongoose . disconnect ( ) ) ;
658
658
659
659
it ( 'should yield false with message option for authenticate' , function ( done ) {
@@ -859,7 +859,7 @@ describe('passportLocalMongoose', function() {
859
859
860
860
describe ( 'static #authenticate() async' , function ( ) {
861
861
beforeEach ( dropMongodbCollections ( connectionString ) ) ;
862
- beforeEach ( ( ) => mongoose . connect ( connectionString , { bufferCommands : false , autoIndex : false , useNewUrlParser : true } ) ) ;
862
+ beforeEach ( ( ) => mongoose . connect ( connectionString , { bufferCommands : false , autoIndex : false , useNewUrlParser : true , useUnifiedTopology : true } ) ) ;
863
863
afterEach ( ( ) => mongoose . disconnect ( ) ) ;
864
864
865
865
it ( 'should yield false with message option for authenticate' , async ( ) => {
@@ -1018,7 +1018,7 @@ describe('passportLocalMongoose', function() {
1018
1018
1019
1019
describe ( 'static #deserializeUser()' , function ( ) {
1020
1020
beforeEach ( dropMongodbCollections ( connectionString ) ) ;
1021
- beforeEach ( ( ) => mongoose . connect ( connectionString , { bufferCommands : false , autoIndex : false , useNewUrlParser : true } ) ) ;
1021
+ beforeEach ( ( ) => mongoose . connect ( connectionString , { bufferCommands : false , autoIndex : false , useNewUrlParser : true , useUnifiedTopology : true } ) ) ;
1022
1022
afterEach ( ( ) => mongoose . disconnect ( ) ) ;
1023
1023
1024
1024
it ( 'should define a static deserializeUser function for passport' , function ( ) {
@@ -1059,7 +1059,7 @@ describe('passportLocalMongoose', function() {
1059
1059
1060
1060
describe ( 'static #findByUsername() callback' , function ( ) {
1061
1061
beforeEach ( dropMongodbCollections ( connectionString ) ) ;
1062
- beforeEach ( ( ) => mongoose . connect ( connectionString , { bufferCommands : false , autoIndex : false , useNewUrlParser : true } ) ) ;
1062
+ beforeEach ( ( ) => mongoose . connect ( connectionString , { bufferCommands : false , autoIndex : false , useNewUrlParser : true , useUnifiedTopology : true } ) ) ;
1063
1063
afterEach ( ( ) => mongoose . disconnect ( ) ) ;
1064
1064
1065
1065
it ( 'should define static findByUsername helper function' , function ( ) {
@@ -1187,7 +1187,7 @@ describe('passportLocalMongoose', function() {
1187
1187
1188
1188
describe ( 'static #findByUsername() async' , function ( ) {
1189
1189
beforeEach ( dropMongodbCollections ( connectionString ) ) ;
1190
- beforeEach ( ( ) => mongoose . connect ( connectionString , { bufferCommands : false , autoIndex : false , useNewUrlParser : true } ) ) ;
1190
+ beforeEach ( ( ) => mongoose . connect ( connectionString , { bufferCommands : false , autoIndex : false , useNewUrlParser : true , useUnifiedTopology : true } ) ) ;
1191
1191
afterEach ( ( ) => mongoose . disconnect ( ) ) ;
1192
1192
1193
1193
it ( 'should define static findByUsername helper function' , ( ) => {
@@ -1285,7 +1285,7 @@ describe('passportLocalMongoose', function() {
1285
1285
1286
1286
describe ( 'static #register() callback' , function ( ) {
1287
1287
beforeEach ( dropMongodbCollections ( connectionString ) ) ;
1288
- beforeEach ( ( ) => mongoose . connect ( connectionString , { bufferCommands : false , autoIndex : false , useNewUrlParser : true } ) ) ;
1288
+ beforeEach ( ( ) => mongoose . connect ( connectionString , { bufferCommands : false , autoIndex : false , useNewUrlParser : true , useUnifiedTopology : true } ) ) ;
1289
1289
afterEach ( ( ) => mongoose . disconnect ( ) ) ;
1290
1290
1291
1291
it ( 'should define static register helper function' , function ( ) {
@@ -1413,7 +1413,7 @@ describe('passportLocalMongoose', function() {
1413
1413
1414
1414
describe ( 'static #register() async' , function ( ) {
1415
1415
beforeEach ( dropMongodbCollections ( connectionString ) ) ;
1416
- beforeEach ( ( ) => mongoose . connect ( connectionString , { bufferCommands : false , autoIndex : false , useNewUrlParser : true } ) ) ;
1416
+ beforeEach ( ( ) => mongoose . connect ( connectionString , { bufferCommands : false , autoIndex : false , useNewUrlParser : true , useUnifiedTopology : true } ) ) ;
1417
1417
afterEach ( ( ) => mongoose . disconnect ( ) ) ;
1418
1418
1419
1419
it ( 'should define static register helper function' , function ( ) {
0 commit comments