summaryrefslogtreecommitdiff
path: root/users/test/unit/user_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'users/test/unit/user_test.rb')
-rw-r--r--users/test/unit/user_test.rb14
1 files changed, 6 insertions, 8 deletions
diff --git a/users/test/unit/user_test.rb b/users/test/unit/user_test.rb
index c8c837b..5d1fe06 100644
--- a/users/test/unit/user_test.rb
+++ b/users/test/unit/user_test.rb
@@ -56,23 +56,21 @@ class UserTest < ActiveSupport::TestCase
other_user.destroy
end
- test "login needs to be different from other peoples email aliases" do
- other_user = FactoryGirl.create :user
- other_user.email_aliases.build :email => @user.login
- other_user.save
- assert !@user.valid?
- other_user.destroy
+ test "deprecated public key api still works" do
+ key = SecureRandom.base64(4096)
+ @user.public_key = key
+ assert_equal key, @user.public_key
end
test "pgp key view" do
@user.public_key = SecureRandom.base64(4096)
@user.save
- view = User.pgp_key_by_handle.key(@user.login)
+ view = Identity.pgp_key_by_email.key(@user.email_address)
assert_equal 1, view.rows.count
assert result = view.rows.first
- assert_equal @user.login, result["key"]
+ assert_equal @user.email_address, result["key"]
assert_equal @user.public_key, result["value"]
end
end