PageRenderTime 483ms CodeModel.GetById 382ms app.highlight 1ms RepoModel.GetById 99ms app.codeStats 0ms

/features/digest_authentication.feature

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