summaryrefslogtreecommitdiff
path: root/test/unit/identity_test.rb
diff options
context:
space:
mode:
authorazul <azul@riseup.net>2018-01-28 08:37:45 -0800
committerazul <azul@riseup.net>2018-01-28 08:37:45 -0800
commit19606ec31d7a1606b5e9fc4df2440a6b470e9d97 (patch)
tree3a1c851033c46e1a140de3e3b5a17ad4b7f2647e /test/unit/identity_test.rb
parentf77e48b1ffdc2350c454ced2fe1eba6446f7bc76 (diff)
parent54653f75cf44890310a06c3a8a6be59625629d2a (diff)
Merge branch 'feature/different-keytypes' into 'master'
initial feature description for key uploads See merge request leap/webapp!58
Diffstat (limited to 'test/unit/identity_test.rb')
-rw-r--r--test/unit/identity_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/unit/identity_test.rb b/test/unit/identity_test.rb
index 6836487..43f644a 100644
--- a/test/unit/identity_test.rb
+++ b/test/unit/identity_test.rb
@@ -80,6 +80,14 @@ class IdentityTest < ActiveSupport::TestCase
assert_equal pgp_key_string, @id.keys[:pgp]
end
+ test "deleting pgp key" do
+ @id = Identity.for(@user)
+ @id.set_key(:pgp, pgp_key_string)
+ @id.delete_key(:pgp)
+ assert_nil @id.keys[:pgp]
+ assert_equal Hash.new, @id.keys
+ end
+
test "querying pgp key via couch" do
@id = Identity.for(@user)
@id.set_key(:pgp, pgp_key_string)