diff options
Diffstat (limited to 'test/functional/admin/templates_controller_test.rb')
-rw-r--r-- | test/functional/admin/templates_controller_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/admin/templates_controller_test.rb b/test/functional/admin/templates_controller_test.rb index 37b8680..38c972b 100644 --- a/test/functional/admin/templates_controller_test.rb +++ b/test/functional/admin/templates_controller_test.rb @@ -3,11 +3,11 @@ require 'test_helper' class Admin::TemplatesControllerTest < ActionController::TestCase setup do @template = templates(:one) - @request.env['HTTP_AUTHORIZATION'] = basic_auth_creds('admin', GLSAMAKER_DEVEL_PASSWORD) + log_in_as :admin end test "should not grant access to regular users" do - @request.env['HTTP_AUTHORIZATION'] = basic_auth_creds('test', GLSAMAKER_DEVEL_PASSWORD) + log_in_as :user get :index assert_redirected_to :controller => '/index', :action => 'error', :type => 'access' end |