aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal/http_authentication.rb
diff options
context:
space:
mode:
authorbogdanvlviv <bogdanvlviv@gmail.com>2018-07-21 16:12:14 +0300
committerbogdanvlviv <bogdanvlviv@gmail.com>2018-07-21 16:12:14 +0300
commit2f413f422ac43bd7d26598f857a81a61cb099557 (patch)
treeb209d14a544e59d361380ac414f23a8a453791a2 /actionpack/lib/action_controller/metal/http_authentication.rb
parentd162188dd662a7d9f62ba8431474f50bc35e3e93 (diff)
downloadrails-2f413f422ac43bd7d26598f857a81a61cb099557.tar.gz
rails-2f413f422ac43bd7d26598f857a81a61cb099557.tar.bz2
rails-2f413f422ac43bd7d26598f857a81a61cb099557.zip
Clarify example of the test `ActionController::HttpAuthentication::Token` [ci skip]
Follow up #33401, 5491f8115711d8b34d52f8ba5e52ba39a49b08fe.
Diffstat (limited to 'actionpack/lib/action_controller/metal/http_authentication.rb')
-rw-r--r--actionpack/lib/action_controller/metal/http_authentication.rb7
1 files changed, 3 insertions, 4 deletions
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