From 370be6caa8a366774fba15d09fb03ee4d923b861 Mon Sep 17 00:00:00 2001 From: Azul Date: Wed, 24 Jul 2013 11:09:04 +0200 Subject: keeping the pgp_key accessors for User so views still work --- users/test/unit/user_test.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'users/test') 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 -- cgit v1.2.3