@@ -272,13 +272,13 @@ describe('client authentication', function () {
272272 var args = config . configureClient ( parser , ip , {
273273 password : auth
274274 } ) ;
275- client = redis . createClient . apply ( redis . createClient , args ) ;
275+ client = redis . createClient . apply ( null , args ) ;
276276 client . set ( 'foo' , 'bar' ) ;
277277 client . subscribe ( 'somechannel' , 'another channel' , function ( err , res ) {
278278 client . once ( 'ready' , function ( ) {
279279 assert . strictEqual ( client . pub_sub_mode , 1 ) ;
280280 client . get ( 'foo' , function ( err , res ) {
281- assert . strictEqual ( err . message , ' ERR only (P )SUBSCRIBE / (P )UNSUBSCRIBE / QUIT allowed in this context' ) ;
281+ assert ( / E R R o n l y \( P \ )S U B S C R I B E \/ \( P \ )U N S U B S C R I B E / . test ( err . message ) ) ;
282282 done ( ) ;
283283 } ) ;
284284 } ) ;
@@ -292,7 +292,7 @@ describe('client authentication', function () {
292292 } ) ;
293293 } ) ;
294294
295- it ( 'indivdual commands work properly with batch' , function ( done ) {
295+ it ( 'individual commands work properly with batch' , function ( done ) {
296296 // quit => might return an error instead of "OK" in the exec callback... (if not connected)
297297 // auth => might return an error instead of "OK" in the exec callback... (if no password is required / still loading on Redis <= 2.4)
298298 // This could be fixed by checking the return value of the callback in the exec callback and
@@ -302,7 +302,7 @@ describe('client authentication', function () {
302302 var args = config . configureClient ( parser , 'localhost' , {
303303 noReadyCheck : true
304304 } ) ;
305- client = redis . createClient . apply ( redis . createClient , args ) ;
305+ client = redis . createClient . apply ( null , args ) ;
306306 assert . strictEqual ( client . selected_db , undefined ) ;
307307 var end = helper . callFuncAfter ( done , 8 ) ;
308308 client . on ( 'monitor' , function ( ) {
@@ -317,9 +317,9 @@ describe('client authentication', function () {
317317 } )
318318 . monitor ( )
319319 . set ( 'foo' , 'bar' , helper . isString ( 'OK' ) )
320- . INFO ( function ( err , res ) {
321- assert . strictEqual ( res . indexOf ( '# Server \r\nredis_version: ' ) , 0 ) ;
322- assert . deepEqual ( client . serverInfo . db5 , { avg_ttl : 0 , expires : 0 , keys : 1 } ) ;
320+ . INFO ( 'stats' , function ( err , res ) {
321+ assert . strictEqual ( res . indexOf ( '# Stats \r\n ' ) , 0 ) ;
322+ assert . strictEqual ( client . serverInfo . sync_full , '0' ) ;
323323 } )
324324 . get ( 'foo' , helper . isString ( 'bar' ) )
325325 . subscribe ( [ 'foo' , 'bar' ] )
@@ -328,8 +328,8 @@ describe('client authentication', function () {
328328 . psubscribe ( '*' )
329329 . quit ( helper . isString ( 'OK' ) ) // this might be interesting
330330 . exec ( function ( err , res ) {
331- res [ 4 ] = res [ 4 ] . substr ( 0 , 10 ) ;
332- assert . deepEqual ( res , [ 'OK' , 'OK' , 'OK' , 'OK' , '# Server \r\n' , 'bar' , 'bar' , 'foo' , '/foo' , '*' , 'OK' ] ) ;
331+ res [ 4 ] = res [ 4 ] . substr ( 0 , 9 ) ;
332+ assert . deepEqual ( res , [ 'OK' , 'OK' , 'OK' , 'OK' , '# Stats \r\n' , 'bar' , 'bar' , 'foo' , '/foo' , '*' , 'OK' ] ) ;
333333 end ( ) ;
334334 } ) ;
335335 } ) ;
0 commit comments