mirror of
https://github.com/discourse/discourse.git
synced 2025-02-16 18:24:52 -06:00
Add spec to ensure that even staged users contain a primary email.
This commit is contained in:
parent
24e0e000b9
commit
305b9b2da0
@ -26,6 +26,16 @@ describe User do
|
||||
expect(user.errors.messages).to include(:primary_email)
|
||||
end
|
||||
end
|
||||
|
||||
describe 'when user is staged' do
|
||||
it 'should still validate primary_email' do
|
||||
user.staged = true
|
||||
user.primary_email = nil
|
||||
|
||||
expect(user).to_not be_valid
|
||||
expect(user.errors.messages).to include(:primary_email)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user