summaryrefslogtreecommitdiff
path: root/users/test/functional/helper_methods_test.rb
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2012-11-12 19:42:00 +0100
committerAzul <azul@leap.se>2012-11-12 19:42:00 +0100
commita0ba5ec9c705a74b86fdb558436fb05103bf88e3 (patch)
tree22e0562166e38eb84dc20c8e7addf3089b3af13c /users/test/functional/helper_methods_test.rb
parent05ea71016fd54a14159c72299c25efbdc2f177bc (diff)
parentfe8b49232d31681667badaaeff7aa4d0a40445ea (diff)
Merge branch 'develop' into feature-client-side-validations
Conflicts: Gemfile.lock
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