@@ -46,9 +46,14 @@ describe('User Model', function() {
46
46
return < %= expect ( ) % > user . save ( ) < %= to ( ) % > . be . rejected ;
47
47
} ) ;
48
48
49
- it ( 'should fail when saving without an email' , function ( ) {
49
+ it ( 'should fail when saving with a null email' , function ( ) {
50
50
user . email = null ;
51
51
return < %= expect ( ) % > user . save ( ) < %= to ( ) % > . be . rejected ;
52
+ } ) ;
53
+
54
+ it ( 'should fail when saving without an email' , function ( ) {
55
+ user . email = undefined ;
56
+ return < %= expect ( ) % > user . save ( ) < %= to ( ) % > . be . rejected ;
52
57
} ) ; < % if ( filters . oauth && filters . googleAuth ) { % >
53
58
54
59
context ( 'given user provider is google' , function ( ) {
@@ -102,11 +107,16 @@ describe('User Model', function() {
102
107
return < %= expect ( ) % > user . save ( ) < %= to ( ) % > . be . rejected ;
103
108
} ) ;
104
109
105
- it ( 'should fail when saving without a password' , function ( ) {
110
+ it ( 'should fail when saving with a null password' , function ( ) {
106
111
user . password = null ;
107
112
return < %= expect ( ) % > user . save ( ) < %= to ( ) % > . be . rejected ;
108
113
} ) ;
109
114
115
+ it ( 'should fail when saving without a password' , function ( ) {
116
+ user . password = undefined ;
117
+ return < %= expect ( ) % > user . save ( ) < %= to ( ) % > . be . rejected ;
118
+ } ) ;
119
+
110
120
context ( 'given the user has been previously saved' , function ( ) {
111
121
beforeEach ( function ( ) {
112
122
return user . save ( ) ;
0 commit comments