From a55cc3653de22d868ade5303918280a38e8e9fe8 Mon Sep 17 00:00:00 2001 From: Azul Date: Wed, 31 Jan 2018 12:27:55 +0100 Subject: keys: store type and rev in hash rather than serialized Since the old keys used to be strings i started out by json serializing the new keys with type, value, rev. However storing serialized json in couch (json) does not really make sense. So now we do not serialize but instead have one json document. The lookup for a key of type pgp may still return a string but for everything that uses the new api it will return a hash with type and revision. This data structure is way easier to handle also on the nickserver side. --- features/step_definitions/key_steps.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'features') diff --git a/features/step_definitions/key_steps.rb b/features/step_definitions/key_steps.rb index 3d5e015..ad3fac6 100644 --- a/features/step_definitions/key_steps.rb +++ b/features/step_definitions/key_steps.rb @@ -16,7 +16,7 @@ Then /^I should have published an? "([^"]*)" key(?: with value "([^"]*)")?$/ do identity = Identity.for(@user) keys = identity.keys assert_includes keys.keys, type - assert_equal value, JSON.parse(keys[type])['value'] if value + assert_equal value, keys[type]['value'] if value end Then /^I should not have published an? "([^"]*)" key$/ do |type| -- cgit v1.2.3