summaryrefslogtreecommitdiff
path: root/users/test/functional/test_helpers_test.rb
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2013-08-27 14:55:43 +0200
committerAzul <azul@leap.se>2013-08-27 14:57:44 +0200
commit5e6a2a2995598489372676bf8e045dc2dfda6c81 (patch)
tree4b1d675191fededd08ad2329cb8b50e9eb74c92e /users/test/functional/test_helpers_test.rb
parent147ccec989672f9b1314aa6dcc5ce8578e841370 (diff)
token.user will get you the right user
This way we can stub the token to return the user directly. Stubbing User.find_by_param is not a good idea as it will make all calls to User#find_by_param with a different id fail.
Diffstat (limited to 'users/test/functional/test_helpers_test.rb')
-rw-r--r--users/test/functional/test_helpers_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/users/test/functional/test_helpers_test.rb b/users/test/functional/test_helpers_test.rb
index d1bdb64..9bd01ad 100644
--- a/users/test/functional/test_helpers_test.rb
+++ b/users/test/functional/test_helpers_test.rb
@@ -21,7 +21,7 @@ class TestHelpersTest < ActionController::TestCase
def test_login_stubs_token
login
assert @token
- assert_equal @current_user.id, @token.user_id
+ assert_equal @current_user, @token.user
end
def test_login_adds_token_header