diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-02-22 15:55:20 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-02-22 15:55:20 +0000 |
commit | ad8c02ca825b471885b211cb158342d8b6bd975b (patch) | |
tree | bec96197def6aab36a6806d0a799ccc480953743 /test/integration | |
parent | 8405d575167da20c82e9624d201e2e2441868fab (diff) | |
download | redmine-ad8c02ca825b471885b211cb158342d8b6bd975b.tar.gz redmine-ad8c02ca825b471885b211cb158342d8b6bd975b.zip |
add "assert_response 401" to tests (#16107)
git-svn-id: http://svn.redmine.org/redmine/trunk@12917 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration')
-rw-r--r-- | test/integration/api_test/authentication_test.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/integration/api_test/authentication_test.rb b/test/integration/api_test/authentication_test.rb index 92f7db684..5ec6a8824 100644 --- a/test/integration/api_test/authentication_test.rb +++ b/test/integration/api_test/authentication_test.rb @@ -31,11 +31,13 @@ class Redmine::ApiTest::AuthenticationTest < Redmine::ApiTest::Base def test_api_should_trigger_basic_http_auth_with_basic_authorization_header ApplicationController.any_instance.expects(:authenticate_with_http_basic).once get '/users/current.xml', {}, credentials('jsmith') + assert_response 401 end def test_api_should_not_trigger_basic_http_auth_with_non_basic_authorization_header ApplicationController.any_instance.expects(:authenticate_with_http_basic).never get '/users/current.xml', {}, 'HTTP_AUTHORIZATION' => 'Digest foo bar' + assert_response 401 end def test_invalid_utf8_credentials_should_not_trigger_an_error |