aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal
diff options
context:
space:
mode:
author黄松 <pinewong@163.com>2018-07-20 11:26:26 +0800
committerGitHub <noreply@github.com>2018-07-20 11:26:26 +0800
commitbd9062971e4b80822bade423c7644bb4eafe492e (patch)
tree4f853c11ea0d6d47d326213ab5a40eee34e93aa2 /actionpack/lib/action_controller/metal
parent01429a665c1eadd20a64ca25d36190a9d9b555b1 (diff)
downloadrails-bd9062971e4b80822bade423c7644bb4eafe492e.tar.gz
rails-bd9062971e4b80822bade423c7644bb4eafe492e.tar.bz2
rails-bd9062971e4b80822bade423c7644bb4eafe492e.zip
Fix basic auth problem in ActionController::HttpAuthentication::Basic doc
Diffstat (limited to 'actionpack/lib/action_controller/metal')
-rw-r--r--actionpack/lib/action_controller/metal/http_authentication.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/metal/http_authentication.rb b/actionpack/lib/action_controller/metal/http_authentication.rb
index 01676f3237..8d53548e68 100644
--- a/actionpack/lib/action_controller/metal/http_authentication.rb
+++ b/actionpack/lib/action_controller/metal/http_authentication.rb
@@ -56,8 +56,8 @@ module ActionController
# In your integration tests, you can do something like this:
#
# def test_access_granted_from_xml
- # @request.env['HTTP_AUTHORIZATION'] = ActionController::HttpAuthentication::Basic.encode_credentials(users(:dhh).name, users(:dhh).password)
- # get "/notes/1.xml"
+ # headers = { 'HTTP_AUTHORIZATION' => ActionController::HttpAuthentication::Basic.encode_credentials(users(:dhh).name, users(:dhh).password }
+ # get "/notes/1.xml", headers: headers
#
# assert_equal 200, status
# end