mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FIX: Validate user email only once (#12327)
It was validated twice: once by validates_associated and once by has_many.
This commit is contained in:
@ -90,7 +90,7 @@ describe User do
|
||||
user.email = 'test@gmailcom'
|
||||
|
||||
expect(user).to_not be_valid
|
||||
expect(user.errors.messages).to include(:primary_email)
|
||||
expect(user.errors.messages.keys).to contain_exactly(:primary_email)
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user