Skip to content

Commit

Permalink
Add test for HTTP basic authentication when no credential is given.
Browse files Browse the repository at this point in the history
  • Loading branch information
victorteokw committed Jan 23, 2015
1 parent 8c83bd0 commit 3e02cdc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions actionpack/test/controller/http_basic_authentication_test.rb
Expand Up @@ -83,6 +83,13 @@ def authenticate_long_credentials
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
Expand Down

0 comments on commit 3e02cdc

Please sign in to comment.