diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2018-07-21 16:07:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-21 16:07:58 +0200 |
commit | 89123523d2e1e6af42d4ee19ad6537e86af0e49f (patch) | |
tree | b209d14a544e59d361380ac414f23a8a453791a2 /actionpack/lib | |
parent | d162188dd662a7d9f62ba8431474f50bc35e3e93 (diff) | |
parent | 2f413f422ac43bd7d26598f857a81a61cb099557 (diff) | |
download | rails-89123523d2e1e6af42d4ee19ad6537e86af0e49f.tar.gz rails-89123523d2e1e6af42d4ee19ad6537e86af0e49f.tar.bz2 rails-89123523d2e1e6af42d4ee19ad6537e86af0e49f.zip |
Merge pull request #33411 from bogdanvlviv/follow-up-33401-5491f8115711
Clarify example of the test `ActionController::HttpAuthentication::Token` [ci skip]
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/metal/http_authentication.rb | 7 |
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 |