Improve email address validation (#29838)
This commit is contained in:
parent
8ce403a85b
commit
ba5551fd1d
5 changed files with 29 additions and 0 deletions
|
|
@ -40,6 +40,12 @@ RSpec.describe User, type: :model do
|
|||
expect(user.valid?).to be true
|
||||
end
|
||||
|
||||
it 'is valid with a localhost e-mail address' do
|
||||
user = Fabricate.build(:user, email: 'admin@localhost')
|
||||
user.valid?
|
||||
expect(user.valid?).to be true
|
||||
end
|
||||
|
||||
it 'cleans out empty string from languages' do
|
||||
user = Fabricate.build(:user, chosen_languages: [''])
|
||||
user.valid?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue