Skip to content

Commit

Permalink
feat: add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
umihico committed Sep 20, 2021
1 parent de23b51 commit 75fb441
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sample_app/test/models/user_test.rb
Expand Up @@ -43,4 +43,11 @@ def setup
@user.save
assert_not duplicate_user.valid?
end

test 'email addresses should be saved as lower-case' do
mixed_case_email = 'Foo@ExAMPle.CoM'
@user.email = mixed_case_email
@user.save
assert_equal mixed_case_email.downcase, @user.reload.email
end
end

0 comments on commit 75fb441

Please sign in to comment.