This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I'm trying to add HTTP BasicAuth to an existing Rails API (not app - no pages or views). | |
# | |
# At http://blog.matthodan.com/how-to-test-something-with-rspec | |
# (and a thousand or so other places) | |
# I find that it's easy to test this: | |
describe SourcesController do | |
describe "#index" do | |
before :each do | |
@request.env['HTTP_AUTHORIZATION'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Existing requests (all working): | |
POST /1/organizations => creates a new Organization | |
GET /1/organizations => show Organizations | |
GET /1/organizations/13 => show Organizations[13] | |
# and so on. | |
# Current routes.rb: |
OlderNewer