diff options
Diffstat (limited to 'users/test/unit/user_test.rb')
-rw-r--r-- | users/test/unit/user_test.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/users/test/unit/user_test.rb b/users/test/unit/user_test.rb index 2269d4e..5d2a7ea 100644 --- a/users/test/unit/user_test.rb +++ b/users/test/unit/user_test.rb @@ -59,5 +59,12 @@ class UserTest < ActiveSupport::TestCase end - + test "find user by email" do + email = "tryto@find.me" + @user.email = email + @user.save + assert_equal @user, User.find_by_email(email) + assert_equal @user, User.find_by_email_or_alias(email) + assert_nil User.find_by_email_alias(email) + end end |