diff options
author | Azul <azul@leap.se> | 2013-07-19 12:21:40 +0200 |
---|---|---|
committer | Azul <azul@leap.se> | 2013-07-24 10:55:51 +0200 |
commit | c0b88d9e8fe574d6164f48211db50f3b8a4c4d93 (patch) | |
tree | 20e42fd20547705acafb3c67efe4da381982a836 /users/test/unit/identity_test.rb | |
parent | 51582a668b04d2c1322ad1babe8599ae8797cd3b (diff) |
setter for keys for dirty tracking, more robust tests
Just altering identity.keys did not mark identities as changed. Also we now have a sane default for keys.
Diffstat (limited to 'users/test/unit/identity_test.rb')
-rw-r--r-- | users/test/unit/identity_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/users/test/unit/identity_test.rb b/users/test/unit/identity_test.rb index d20ad93..40b1296 100644 --- a/users/test/unit/identity_test.rb +++ b/users/test/unit/identity_test.rb @@ -57,13 +57,13 @@ class IdentityTest < ActiveSupport::TestCase test "setting and getting pgp key" do id = @user.identity - id.keys[:pgp] = pgp_key_string + id.set_key(:pgp, pgp_key_string) assert_equal pgp_key_string, id.keys[:pgp] end test "querying pgp key via couch" do id = @user.identity - id.keys[:pgp] = pgp_key_string + id.set_key(:pgp, pgp_key_string) id.save view = Identity.pgp_key_by_email.key(id.address) assert_equal 1, view.rows.count |