diff options
author | Azul <azul@leap.se> | 2013-07-24 11:09:04 +0200 |
---|---|---|
committer | Azul <azul@leap.se> | 2013-07-24 11:38:32 +0200 |
commit | 370be6caa8a366774fba15d09fb03ee4d923b861 (patch) | |
tree | 48522a4750e4e3433b7670dfe158762f800d3eae /users/test/unit/user_test.rb | |
parent | d70c5796a2989b7b43f7e287899fb1394ae28280 (diff) |
keeping the pgp_key accessors for User so views still work
Diffstat (limited to 'users/test/unit/user_test.rb')
-rw-r--r-- | users/test/unit/user_test.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/users/test/unit/user_test.rb b/users/test/unit/user_test.rb index 477c727..89ee749 100644 --- a/users/test/unit/user_test.rb +++ b/users/test/unit/user_test.rb @@ -70,14 +70,16 @@ class UserTest < ActiveSupport::TestCase end test "pgp key view" do - @user.public_key = SecureRandom.base64(4096) - @user.save + key = SecureRandom.base64(4096) + identity = Identity.create_for @user + identity.set_key('pgp', key) + identity.save view = Identity.pgp_key_by_email.key(@user.email_address) assert_equal 1, view.rows.count assert result = view.rows.first assert_equal @user.email_address, result["key"] - assert_equal @user.public_key, result["value"] + assert_equal key, result["value"] end end |