summaryrefslogtreecommitdiff
path: root/users/test
diff options
context:
space:
mode:
Diffstat (limited to 'users/test')
-rw-r--r--users/test/unit/identity_test.rb11
1 files changed, 4 insertions, 7 deletions
diff --git a/users/test/unit/identity_test.rb b/users/test/unit/identity_test.rb
index 389ef89..3130ddc 100644
--- a/users/test/unit/identity_test.rb
+++ b/users/test/unit/identity_test.rb
@@ -7,13 +7,10 @@ class IdentityTest < ActiveSupport::TestCase
end
test "user has identity to start with" do
- id = Identity.new user_id: @user.id
- id.save
- assert_equal 1, Identity.by_user_id.key(@user.id).count
- identity = Identity.find_by_user_id(@user.id)
- assert_equal @user.email_address, identity.address
- assert_equal @user.email_address, identity.destination
- assert_equal @user, identity.user
+ id = @user.build_identity
+ assert_equal @user.email_address, id.address
+ assert_equal @user.email_address, id.destination
+ assert_equal @user, id.user
end
test "add alias" do