diff options
author | Alex Legler <alex@a3li.li> | 2011-09-04 01:24:31 +0200 |
---|---|---|
committer | Alex Legler <alex@a3li.li> | 2011-09-04 01:24:31 +0200 |
commit | d9c95b12ab63093adc60ad3b45a79af089c27373 (patch) | |
tree | 95bba8cce0a215988eaa92254a86f807456245d8 /test/functional/admin/templates_controller_test.rb | |
parent | Mark output html_safe in the glsa txt view (diff) | |
download | glsamaker-d9c95b12ab63093adc60ad3b45a79af089c27373.tar.gz glsamaker-d9c95b12ab63093adc60ad3b45a79af089c27373.tar.bz2 glsamaker-d9c95b12ab63093adc60ad3b45a79af089c27373.zip |
Add tests to properly test permissions throughout the application
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 |