diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2018-07-20 21:15:24 +0200 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2018-07-20 21:15:24 +0200 |
commit | 5491f8115711d8b34d52f8ba5e52ba39a49b08fe (patch) | |
tree | c2569c72eaf074b9cd9d768f9839e8860524f74a /actionpack/lib | |
parent | 486e5153cb0a98cf76bd7b679896d2a3f8167553 (diff) | |
download | rails-5491f8115711d8b34d52f8ba5e52ba39a49b08fe.tar.gz rails-5491f8115711d8b34d52f8ba5e52ba39a49b08fe.tar.bz2 rails-5491f8115711d8b34d52f8ba5e52ba39a49b08fe.zip |
[ci skip] Fix syntax error + make example easier to follow.
Follow up to 9f152a606
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/metal/http_authentication.rb | 5 |
1 files changed, 3 insertions, 2 deletions
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 |