Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
f43e4197
Commit
f43e4197
authored
Jun 11, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test for the apostrophe in the email
parent
e57fdc11
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
lib/email_validator.rb
lib/email_validator.rb
+0
-0
spec/models/user_spec.rb
spec/models/user_spec.rb
+11
-0
No files found.
lib/
gitlab/
email_validator.rb
→
lib/email_validator.rb
View file @
f43e4197
File moved
spec/models/user_spec.rb
View file @
f43e4197
...
...
@@ -83,11 +83,17 @@ describe User do
user
=
build
(
:user
,
email:
'info@example.com'
)
expect
(
user
).
to
be_valid
end
it
'accepts info+test@example.com'
do
user
=
build
(
:user
,
email:
'info+test@example.com'
)
expect
(
user
).
to
be_valid
end
it
"accepts o'reilly@example.com"
do
user
=
build
(
:user
,
email:
"o'reilly@example.com"
)
expect
(
user
).
to
be_valid
end
it
'rejects test@test@example.com'
do
user
=
build
(
:user
,
email:
'test@test@example.com'
)
expect
(
user
).
to
be_invalid
...
...
@@ -97,6 +103,11 @@ describe User do
user
=
build
(
:user
,
email:
'mailto:test@example.com'
)
expect
(
user
).
to
be_invalid
end
it
"rejects lol!'+=?><#$%^&*()@gmail.com"
do
user
=
build
(
:user
,
email:
"lol!'+=?><#$%^&*()@gmail.com"
)
expect
(
user
).
to
be_invalid
end
end
end
...
...
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