From 5491f8115711d8b34d52f8ba5e52ba39a49b08fe Mon Sep 17 00:00:00 2001 From: Kasper Timm Hansen Date: Fri, 20 Jul 2018 21:15:24 +0200 Subject: [ci skip] Fix syntax error + make example easier to follow. Follow up to 9f152a606 --- actionpack/lib/action_controller/metal/http_authentication.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_controller') diff --git a/actionpack/lib/action_controller/metal/http_authentication.rb b/actionpack/lib/action_controller/metal/http_authentication.rb index 8d53548e68..51d25ac1e0 100644 --- a/actionpack/lib/action_controller/metal/http_authentication.rb +++ b/actionpack/lib/action_controller/metal/http_authentication.rb @@ -56,8 +56,9 @@ module ActionController # In your integration tests, you can do something like this: # # def test_access_granted_from_xml - # headers = { 'HTTP_AUTHORIZATION' => ActionController::HttpAuthentication::Basic.encode_credentials(users(:dhh).name, users(:dhh).password } - # get "/notes/1.xml", headers: headers + # authorization = ActionController::HttpAuthentication::Basic.encode_credentials(users(:dhh).name, users(:dhh).password) + # + # get "/notes/1.xml", headers: { 'HTTP_AUTHORIZATION' => authorization } # # assert_equal 200, status # end -- cgit v1.2.3