This project is archived and is in readonly mode.
HttpAuthentication::Basic gives wrong information on example on how to authenticate
Reported by eydaimon | July 30th, 2010 @ 05:51 AM
http://api.rails.info/classes/ActionController/HttpAuthentication/B...
 In your integration tests, you can do something like this:
   def test_access_granted_from_xml
     get(
       "/notes/1.xml", nil,
       :authorization => ActionController::HttpAuthentication::Basic.encode_credentials(users(:dhh).name, users(:dhh).password)
     )
     assert_equal 200, status
   end
This doesn't work. It should read:
 get(
  "/notes/1.xml", nil,
  'HTTP_AUTHORIZATION' => ActionController::HttpAuthentication::Basic.encode_credentials(users(:dhh).name, users(:dhh).password)
 )
Comments and changes to this ticket
- 
        

Rohit Arondekar July 30th, 2010 @ 10:13 AM
- State changed from new to resolved
 - Importance changed from  to Low
 
Fixed here: http://github.com/lifo/docrails/commit/48d85a61bc0918d6ea1bad574c96...
The change will be merged with the main Rails repo soon. Thank you for reporting the issue! :)
 
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>