diff options
author | jessib <jessib@riseup.net> | 2013-09-02 09:59:49 -0700 |
---|---|---|
committer | jessib <jessib@riseup.net> | 2013-09-02 09:59:49 -0700 |
commit | 6110093e939db07fd27fac7c28ddcd09a49e70ed (patch) | |
tree | 4393c3e8fcb2969b0bd21800bff7dd5a1fc9c3d7 /users/test/unit/identity_test.rb | |
parent | 060e06daa065f02b811dfe12850b101a62c12c8d (diff) | |
parent | 77af7ac953fb22c181056e8c40c8749d12a63922 (diff) |
Merge pull request #74 from azul/refactor/finding-users
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 |