@@ -41,44 +41,44 @@ describe('auth', function () {
41
41
} ) ;
42
42
} ) ;
43
43
44
- it ( 'should emit "authError " when the server doesn\'t need auth' , function ( done ) {
44
+ it ( 'should emit "error " when the server doesn\'t need auth' , function ( done ) {
45
45
var server = new MockServer ( 17379 , function ( argv ) {
46
46
if ( argv [ 0 ] === 'auth' && argv [ 1 ] === 'pass' ) {
47
47
return new Error ( 'ERR Client sent AUTH, but no password is set' ) ;
48
48
}
49
49
} ) ;
50
50
var redis = new Redis ( { port : 17379 , password : 'pass' } ) ;
51
- redis . on ( 'authError ' , function ( error ) {
51
+ redis . on ( 'error ' , function ( error ) {
52
52
expect ( error ) . to . have . property ( 'message' , 'ERR Client sent AUTH, but no password is set' ) ;
53
53
redis . disconnect ( ) ;
54
54
server . disconnect ( ) ;
55
55
done ( ) ;
56
56
} ) ;
57
57
} ) ;
58
58
59
- it ( 'should emit "authError " when the password is wrong' , function ( done ) {
59
+ it ( 'should emit "error " when the password is wrong' , function ( done ) {
60
60
var server = new MockServer ( 17379 , function ( argv ) {
61
61
if ( argv [ 0 ] === 'auth' && argv [ 1 ] === 'pass' ) {
62
62
return new Error ( 'ERR invalid password' ) ;
63
63
}
64
64
} ) ;
65
65
var redis = new Redis ( { port : 17379 , password : 'pass' } ) ;
66
- redis . on ( 'authError ' , function ( error ) {
66
+ redis . on ( 'error ' , function ( error ) {
67
67
expect ( error ) . to . have . property ( 'message' , 'ERR invalid password' ) ;
68
68
redis . disconnect ( ) ;
69
69
server . disconnect ( ) ;
70
70
done ( ) ;
71
71
} ) ;
72
72
} ) ;
73
73
74
- it ( 'should emit "authError " when password is not provided' , function ( done ) {
74
+ it ( 'should emit "error " when password is not provided' , function ( done ) {
75
75
var server = new MockServer ( 17379 , function ( argv ) {
76
76
if ( argv [ 0 ] === 'info' ) {
77
77
return new Error ( 'NOAUTH Authentication required.' ) ;
78
78
}
79
79
} ) ;
80
80
var redis = new Redis ( { port : 17379 } ) ;
81
- redis . on ( 'authError ' , function ( error ) {
81
+ redis . on ( 'error ' , function ( error ) {
82
82
expect ( error ) . to . have . property ( 'message' , 'NOAUTH Authentication required.' ) ;
83
83
redis . disconnect ( ) ;
84
84
server . disconnect ( ) ;
0 commit comments