@@ -9,7 +9,7 @@ describe('isPasswordValid Helper', function() {
9
9
10
10
isValid . should . be . an ( 'array' ) ;
11
11
isValid . length . should . equal ( 1 ) ;
12
- isValid [ 0 ] . should . equal ( 'Password must be at least 7 characters' ) ;
12
+ isValid [ 0 ] . should . equal ( 'Password must be at least 7 characters. ' ) ;
13
13
} ) ;
14
14
15
15
it ( 'should not allow passwords longer than 70 characters' , async function ( ) {
@@ -25,39 +25,39 @@ describe('isPasswordValid Helper', function() {
25
25
26
26
isValid . should . be . an ( 'array' ) ;
27
27
isValid . length . should . equal ( 1 ) ;
28
- isValid [ 0 ] . should . equal ( 'Password can not contain 3 or more repeated characters' ) ;
28
+ isValid [ 0 ] . should . equal ( 'Password can not contain 3 or more repeated characters. ' ) ;
29
29
} ) ;
30
30
31
31
it ( 'should require at least 1 lowercase character' , async function ( ) {
32
32
const isValid = await sails . helpers . isPasswordValid ( '1234ABCD.K' , true ) ;
33
33
34
34
isValid . should . be . an ( 'array' ) ;
35
35
isValid . length . should . equal ( 1 ) ;
36
- isValid [ 0 ] . should . equal ( 'Password must have at least 1 lowercase character' ) ;
36
+ isValid [ 0 ] . should . equal ( 'Password must have at least 1 lowercase character. ' ) ;
37
37
} ) ;
38
38
39
39
it ( 'should require at least 1 uppercase character' , async function ( ) {
40
40
const isValid = await sails . helpers . isPasswordValid ( '1234abcd.k' , true ) ;
41
41
42
42
isValid . should . be . an ( 'array' ) ;
43
43
isValid . length . should . equal ( 1 ) ;
44
- isValid [ 0 ] . should . equal ( 'Password must have at least 1 uppercase character' ) ;
44
+ isValid [ 0 ] . should . equal ( 'Password must have at least 1 uppercase character. ' ) ;
45
45
} ) ;
46
46
47
47
it ( 'should require at least 1 digit' , async function ( ) {
48
48
const isValid = await sails . helpers . isPasswordValid ( 'AbcdEfg.k' , true ) ;
49
49
50
50
isValid . should . be . an ( 'array' ) ;
51
51
isValid . length . should . equal ( 1 ) ;
52
- isValid [ 0 ] . should . equal ( 'Password must have at least 1 digit' ) ;
52
+ isValid [ 0 ] . should . equal ( 'Password must have at least 1 digit. ' ) ;
53
53
} ) ;
54
54
55
55
it ( 'should require at least 1 special character' , async function ( ) {
56
56
const isValid = await sails . helpers . isPasswordValid ( '12345Abcd' , true ) ;
57
57
58
58
isValid . should . be . an ( 'array' ) ;
59
59
isValid . length . should . equal ( 1 ) ;
60
- isValid [ 0 ] . should . equal ( 'Password must have at least 1 special character' ) ;
60
+ isValid [ 0 ] . should . equal ( 'Password must have at least 1 special character. ' ) ;
61
61
} ) ;
62
62
63
63
it ( 'should return true for valid password' , async function ( ) {
@@ -90,7 +90,7 @@ describe('isPasswordValid Helper', function() {
90
90
91
91
isValid . should . be . an ( 'array' ) ;
92
92
isValid . length . should . equal ( 1 ) ;
93
- isValid [ 0 ] . should . equal ( 'Password can not contain your email address' ) ;
93
+ isValid [ 0 ] . should . equal ( 'Password can not contain your email address. ' ) ;
94
94
} ) ;
95
95
96
96
it ( 'should not allow first name in password' , async function ( ) {
@@ -102,7 +102,7 @@ describe('isPasswordValid Helper', function() {
102
102
103
103
isValid . should . be . an ( 'array' ) ;
104
104
isValid . length . should . equal ( 1 ) ;
105
- isValid [ 0 ] . should . equal ( 'Password can not contain your first name' ) ;
105
+ isValid [ 0 ] . should . equal ( 'Password can not contain your first name. ' ) ;
106
106
} ) ;
107
107
108
108
it ( 'should not allow last name in password' , async function ( ) {
@@ -114,7 +114,7 @@ describe('isPasswordValid Helper', function() {
114
114
115
115
isValid . should . be . an ( 'array' ) ;
116
116
isValid . length . should . equal ( 1 ) ;
117
- isValid [ 0 ] . should . equal ( 'Password can not contain your last name' ) ;
117
+ isValid [ 0 ] . should . equal ( 'Password can not contain your last name. ' ) ;
118
118
} ) ;
119
119
} ) ;
120
120
0 commit comments