summaryrefslogtreecommitdiff
path: root/users/test/functional/helper_methods_test.rb
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2012-11-12 19:16:55 +0100
committerAzul <azul@leap.se>2012-11-12 19:16:55 +0100
commitc886cc17b6f37ddd556e70fe2d76a3ea28db52bf (patch)
treee27fe040bfaba5840730f466d4c6f90213759d5e /users/test/functional/helper_methods_test.rb
parentca2e1b9f379ccba068ad0ebb852d855f1639cd3a (diff)
parent5b300b554682c232c0955bdb0dd3d8263dde901e (diff)
Merge branch 'feature-warden-srp' into develop
Diffstat (limited to 'users/test/functional/helper_methods_test.rb')
-rw-r--r--users/test/functional/helper_methods_test.rb15
1 files changed, 6 insertions, 9 deletions
diff --git a/users/test/functional/helper_methods_test.rb b/users/test/functional/helper_methods_test.rb
index c0eaf61..2b2375c 100644
--- a/users/test/functional/helper_methods_test.rb
+++ b/users/test/functional/helper_methods_test.rb
@@ -16,26 +16,23 @@ class HelperMethodsTest < ActionController::TestCase
@controller
end
- def test_current_user_with_caching
- @user = stub_logged_in
- assert_equal @user, current_user
- assert_equal @user, current_user # tests caching
+ def test_current_user
+ login
+ assert_equal @current_user, current_user
end
def test_logged_in
- @user = stub_logged_in
+ login
assert logged_in?
end
def test_logged_out
- stub_logged_out
assert !logged_in?
end
def test_admin
- bool = stub
- @user = stub_logged_in
- @user.expects(:is_admin?).returns(bool)
+ login
+ @current_user.expects(:is_admin?).returns(bool = stub)
assert_equal bool, admin?
end