summaryrefslogtreecommitdiff
path: root/users/test/unit
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2012-11-23 12:11:11 +0100
committerAzul <azul@leap.se>2012-11-23 15:09:53 +0100
commitee3c9146e4bbe93ec1f00ee45386a82ec4363c4d (patch)
treeec673f97f22c13c19c1f9034dfe88646525bdeae /users/test/unit
parent716dc248e940be8bd323a9d92f98785737fc99a0 (diff)
identify user by id so rerendering the form does not use new invalid login
Diffstat (limited to 'users/test/unit')
-rw-r--r--users/test/unit/user_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/users/test/unit/user_test.rb b/users/test/unit/user_test.rb
index f057ca7..92c1463 100644
--- a/users/test/unit/user_test.rb
+++ b/users/test/unit/user_test.rb
@@ -23,14 +23,14 @@ class UserTest < ActiveSupport::TestCase
assert !@user.valid?
end
- test "find_by_param gets User by login" do
+ test "find_by_param gets User by id" do
@user.save
- assert_equal @user, User.find_by_param(@user.login)
+ assert_equal @user, User.find_by_param(@user.id)
@user.destroy
end
- test "to_param gives user login" do
- assert_equal @user.login, @user.to_param
+ 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