-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* the RFC gem doesn't support ruby 3.3, but we don't seem to use it anyway
- Loading branch information
1 parent
d84cd86
commit 1147984
Showing
4 changed files
with
0 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,45 +63,4 @@ def self.define_validations(&) | |
end | ||
end | ||
end | ||
|
||
describe 'validates_email' do | ||
before do | ||
@c.define_validations { validates_email(:val) } | ||
end | ||
|
||
it 'allows a valid email' do | ||
@m.val = '[email protected]' | ||
expect(@m).to be_valid | ||
end | ||
|
||
it 'does not allow an email with no domain' do | ||
@m.val = 'some_guy' | ||
expect(@m).not_to be_valid | ||
end | ||
|
||
it 'does not allow an email with no user' do | ||
@m.val = '@somedomain.com' | ||
expect(@m).not_to be_valid | ||
end | ||
|
||
it 'does not allow a malformed email with multiple @' do | ||
@m.val = 'foo@[email protected]' | ||
expect(@m).not_to be_valid | ||
end | ||
|
||
it 'allows a nil email' do | ||
@m.val = nil | ||
expect(@m).to be_valid | ||
end | ||
|
||
it 'does not allow an empty email' do | ||
@m.val = '' | ||
expect(@m).not_to be_valid | ||
end | ||
|
||
it 'does not allow an email with only spaces' do | ||
@m.val = ' ' | ||
expect(@m).not_to be_valid | ||
end | ||
end | ||
end |