From 54653f75cf44890310a06c3a8a6be59625629d2a Mon Sep 17 00:00:00 2001 From: Azul Date: Fri, 19 Jan 2018 14:11:24 +0100 Subject: API: implement deleting keys through new keys api --- test/unit/identity_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/unit/identity_test.rb') 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) -- cgit v1.2.3