Skip to content

Commit

Permalink
Added a validation test for email presence
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabian Alvariza committed Mar 7, 2017
1 parent 90e7aec commit b178f5e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec/models/user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@
context 'when was created with facebook login' do
subject { build :user, :with_fb }
it { should_not validate_uniqueness_of(:email) }
it { should_not validate_presence_of(:email) }
end

context 'when was created with regular login' do
subject { build :user }
it { should validate_uniqueness_of(:email).case_insensitive }
it { should validate_presence_of(:email) }
end
end

Expand Down

0 comments on commit b178f5e

Please sign in to comment.