diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2015-01-28 00:00:17 -0500 |
---|---|---|
committer | Guillermo Iguaran <guilleiguaran@gmail.com> | 2015-01-28 00:00:17 -0500 |
commit | 36082a62048248c27cdd513c943ee94b716bd7f8 (patch) | |
tree | 517cb021abe0c0679a7c39acf11ed5d55d9a9c51 /actionpack/test | |
parent | 1fb9e6eff71eb84b6cb620282c15b7b89d8e70c1 (diff) | |
parent | 98277d1398fa55de25d0b50303ca12aaa061ab75 (diff) | |
download | rails-36082a62048248c27cdd513c943ee94b716bd7f8.tar.gz rails-36082a62048248c27cdd513c943ee94b716bd7f8.tar.bz2 rails-36082a62048248c27cdd513c943ee94b716bd7f8.zip |
Merge pull request #18666 from cheunghy/auth_check_nil
Fixed undefined method error when doing http basic authentication.
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/http_basic_authentication_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/controller/http_basic_authentication_test.rb b/actionpack/test/controller/http_basic_authentication_test.rb index 9052fc6962..20962a90cb 100644 --- a/actionpack/test/controller/http_basic_authentication_test.rb +++ b/actionpack/test/controller/http_basic_authentication_test.rb @@ -83,6 +83,13 @@ class HttpBasicAuthenticationTest < ActionController::TestCase assert_response :unauthorized assert_equal "HTTP Basic: Access denied.\n", @response.body, "Authentication didn't fail for request header #{header} and long credentials" end + + test "unsuccessful authentication with #{header.downcase} and no credentials" do + get :show + + assert_response :unauthorized + assert_equal "HTTP Basic: Access denied.\n", @response.body, "Authentication didn't fail for request header #{header} and no credentials" + end end def test_encode_credentials_has_no_newline |