diff options
author | jessib <jessib@riseup.net> | 2013-09-02 09:59:49 -0700 |
---|---|---|
committer | jessib <jessib@riseup.net> | 2013-09-02 09:59:49 -0700 |
commit | 6110093e939db07fd27fac7c28ddcd09a49e70ed (patch) | |
tree | 4393c3e8fcb2969b0bd21800bff7dd5a1fc9c3d7 /users/test/unit/user_test.rb | |
parent | 060e06daa065f02b811dfe12850b101a62c12c8d (diff) | |
parent | 77af7ac953fb22c181056e8c40c8749d12a63922 (diff) |
Merge pull request #74 from azul/refactor/finding-users
there's no need for User#find_by_param. clean it up
Diffstat (limited to 'users/test/unit/user_test.rb')
-rw-r--r-- | users/test/unit/user_test.rb | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/users/test/unit/user_test.rb b/users/test/unit/user_test.rb index 89ee749..8efb0bd 100644 --- a/users/test/unit/user_test.rb +++ b/users/test/unit/user_test.rb @@ -22,16 +22,6 @@ class UserTest < ActiveSupport::TestCase assert !@user.valid? end - test "find_by_param gets User by id" do - @user.save - assert_equal @user, User.find_by_param(@user.id) - @user.destroy - end - - test "to_param gives user id" do - assert_equal @user.id, @user.to_param - end - test "verifier returns number for the hex in password_verifier" do assert_equal @user.password_verifier.hex, @user.verifier end @@ -58,9 +48,10 @@ class UserTest < ActiveSupport::TestCase test "login needs to be unique amongst aliases" do other_user = FactoryGirl.create :user - Identity.create_for other_user, address: @user.login + id = Identity.create_for other_user, address: @user.login assert !@user.valid? other_user.destroy + id.destroy end test "deprecated public key api still works" do @@ -69,17 +60,4 @@ class UserTest < ActiveSupport::TestCase assert_equal key, @user.public_key end - test "pgp key view" do - 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 key, result["value"] - end end |