Test for the apostrophe in the email
This commit is contained in:
parent
e57fdc1190
commit
f43e41973f
2 changed files with 11 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue