Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scratch-www
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
scratch-www
Commits
7ec4af6c
Commit
7ec4af6c
authored
Oct 23, 2019
by
Ben Wheeler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test registration response validation function
parent
469db4dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
test/unit/lib/validate.test.js
test/unit/lib/validate.test.js
+7
-0
No files found.
test/unit/lib/validate.test.js
View file @
7ec4af6c
...
...
@@ -139,4 +139,11 @@ describe('unit test lib/validate.js', () => {
response
=
validate
.
validateEmailLocally
(
'
much."more unusual"@example.com
'
);
expect
(
response
).
toEqual
({
valid
:
false
,
errMsgId
:
'
registration.validationEmailInvalid
'
});
});
test
(
'
get responseErrorMsg
'
,
()
=>
{
let
response
=
validate
.
responseErrorMsg
(
'
username
'
,
'
bad username
'
);
expect
(
response
).
toEqual
(
'
registration.errorBadUsername
'
);
response
=
validate
.
responseErrorMsg
(
'
password
'
,
'
Ensure this value has at least 6 characters (it has 3).
'
);
expect
(
response
).
toEqual
(
'
registration.errorPasswordTooShort
'
);
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment