PageRenderTime 21ms CodeModel.GetById 13ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/features/basic_authentication.feature

http://github.com/jnunemaker/httparty
Gherkin Specification | 20 lines | 17 code | 3 blank | 0 comment | 0 complexity | a1854e7ee6545d9a60ea9373a10fb48b MD5 | raw file
 1Feature:  Basic Authentication
 2
 3  As a developer
 4  I want to be able to use a service that requires Basic Authentication
 5  Because that is not an uncommon requirement
 6
 7  Scenario: Passing no credentials to a page requiring Basic Authentication
 8    Given a restricted page at '/basic_auth.html'
 9    When I call HTTParty#get with '/basic_auth.html'
10    Then it should return a response with a 401 response code
11
12  Scenario: Passing proper credentials to a page requiring Basic Authentication
13    Given a remote service that returns 'Authenticated Page'
14    And that service is accessed at the path '/basic_auth.html'
15    And that service is protected by Basic Authentication
16    And that service requires the username 'jcash' with the password 'maninblack'
17    When I call HTTParty#get with '/basic_auth.html' and a basic_auth hash:
18       | username | password   |
19       | jcash    | maninblack |
20    Then the return value should match 'Authenticated Page'