From 8ddbaa6184e4dbcc6ef7e81cf555cc18d3822dce Mon Sep 17 00:00:00 2001 From: Azul Date: Fri, 19 Jul 2013 11:09:25 +0200 Subject: support deprecated API to set users main identity pgp key We'll want to get rid of the #public_key and #public_key= functions but they are still used from the users controller. We'll probably have an identity controller instead at some point. --- users/test/unit/identity_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'users/test/unit/identity_test.rb') diff --git a/users/test/unit/identity_test.rb b/users/test/unit/identity_test.rb index 6b0a6b1..d20ad93 100644 --- a/users/test/unit/identity_test.rb +++ b/users/test/unit/identity_test.rb @@ -11,7 +11,7 @@ class IdentityTest < ActiveSupport::TestCase end test "initial identity for a user" do - id = @user.build_identity + id = @user.identity assert_equal @user.email_address, id.address assert_equal @user.email_address, id.destination assert_equal @user, id.user @@ -56,13 +56,13 @@ class IdentityTest < ActiveSupport::TestCase end test "setting and getting pgp key" do - id = @user.build_identity + id = @user.identity id.keys[:pgp] = pgp_key_string assert_equal pgp_key_string, id.keys[:pgp] end test "querying pgp key via couch" do - id = @user.build_identity + id = @user.identity id.keys[:pgp] = pgp_key_string id.save view = Identity.pgp_key_by_email.key(id.address) -- cgit v1.2.3