From 2f413f422ac43bd7d26598f857a81a61cb099557 Mon Sep 17 00:00:00 2001 From: bogdanvlviv Date: Sat, 21 Jul 2018 16:12:14 +0300 Subject: Clarify example of the test `ActionController::HttpAuthentication::Token` [ci skip] Follow up #33401, 5491f8115711d8b34d52f8ba5e52ba39a49b08fe. --- actionpack/lib/action_controller/metal/http_authentication.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 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 51d25ac1e0..a871ccd533 100644 --- a/actionpack/lib/action_controller/metal/http_authentication.rb +++ b/actionpack/lib/action_controller/metal/http_authentication.rb @@ -390,10 +390,9 @@ module ActionController # In your integration tests, you can do something like this: # # def test_access_granted_from_xml - # get( - # "/notes/1.xml", nil, - # 'HTTP_AUTHORIZATION' => ActionController::HttpAuthentication::Token.encode_credentials(users(:dhh).token) - # ) + # authorization = ActionController::HttpAuthentication::Token.encode_credentials(users(:dhh).token) + # + # get "/notes/1.xml", headers: { 'HTTP_AUTHORIZATION' => authorization } # # assert_equal 200, status # end -- cgit v1.2.3