diff options
author | Azul <azul@leap.se> | 2013-01-14 16:24:25 +0100 |
---|---|---|
committer | Azul <azul@leap.se> | 2013-01-14 16:24:25 +0100 |
commit | a9ef046a596b5876792b1cc4ab0d26b9b255c342 (patch) | |
tree | fe691c72f36b42f74a1d850f2e406c50500036e3 /users/test/support/auth_test_helper.rb | |
parent | 3cd3c261bdf02b2da5217fa1c469d30f9d92c9a3 (diff) |
tickets controller tests passing
Diffstat (limited to 'users/test/support/auth_test_helper.rb')
-rw-r--r-- | users/test/support/auth_test_helper.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/users/test/support/auth_test_helper.rb b/users/test/support/auth_test_helper.rb index c9f5612..c0fcf3a 100644 --- a/users/test/support/auth_test_helper.rb +++ b/users/test/support/auth_test_helper.rb @@ -10,10 +10,10 @@ module AuthTestHelper end def login(user_or_method_hash = {}) - @current_user = stub_record(User, user_or_method_hash) - unless @current_user.respond_to? :is_admin? - @current_user.stubs(:is_admin?).returns(false) + if user_or_method_hash.respond_to?(:reverse_merge) + user_or_method_hash.reverse_merge! :is_admin? => false end + @current_user = stub_record(:user, user_or_method_hash, true) request.env['warden'] = stub :user => @current_user return @current_user end |