BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
email_validator.rb
lib/email_validator.rb
+0
-0
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