diff options
author | Azul <azul@leap.se> | 2012-12-13 17:16:05 +0100 |
---|---|---|
committer | Azul <azul@leap.se> | 2012-12-13 17:16:05 +0100 |
commit | 32db6e2ee3ae449f2fe0f947f9ac4aafde340a9d (patch) | |
tree | 1f9abefddc5f3cfb49a96f87e184a78feb8fb506 /users/test/unit/user_test.rb | |
parent | 1a26988cb7ff30061473f4a781166b184b3037ce (diff) | |
parent | feee17e3a9970ac04f5a789255fbf4c3e8e89eb8 (diff) |
Merge branch 'feature/email-aliases-model'
Diffstat (limited to 'users/test/unit/user_test.rb')
-rw-r--r-- | users/test/unit/user_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/users/test/unit/user_test.rb b/users/test/unit/user_test.rb index cce11c2..29f6a89 100644 --- a/users/test/unit/user_test.rb +++ b/users/test/unit/user_test.rb @@ -49,4 +49,13 @@ class UserTest < ActiveSupport::TestCase assert_equal client_rnd, srp_session.aa 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 |