diff options
author | Azul <azul@leap.se> | 2013-08-28 11:53:58 +0200 |
---|---|---|
committer | Azul <azul@leap.se> | 2013-08-30 14:54:30 +0200 |
commit | 7bb1a16d4eee3eb3ef36c6f5b4fc7968e3da7dd6 (patch) | |
tree | 75df9def4e9289b5373cea6108616405896491e1 /users/test/unit/identity_test.rb | |
parent | 060e06daa065f02b811dfe12850b101a62c12c8d (diff) |
there's no need for User#find_by_param. clean it up
Diffstat (limited to 'users/test/unit/identity_test.rb')
-rw-r--r-- | users/test/unit/identity_test.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/users/test/unit/identity_test.rb b/users/test/unit/identity_test.rb index bf24f02..472bc52 100644 --- a/users/test/unit/identity_test.rb +++ b/users/test/unit/identity_test.rb @@ -1,13 +1,13 @@ require 'test_helper' class IdentityTest < ActiveSupport::TestCase + include StubRecordHelper setup do - @user = FactoryGirl.create(:user) + @user = find_record :user end teardown do - @user.destroy end test "initial identity for a user" do @@ -47,12 +47,11 @@ class IdentityTest < ActiveSupport::TestCase end test "validates availability" do - other_user = FactoryGirl.create(:user) + other_user = find_record :user id = Identity.create_for @user, address: alias_name, destination: forward_address taken = Identity.build_for other_user, address: alias_name assert !taken.valid? assert_equal ["This email has already been taken"], taken.errors[:base] - other_user.destroy end test "setting and getting pgp key" do |