2010-04-26 21:32:30 -04:00
|
|
|
Feature: Digest Authentication
|
|
|
|
|
|
|
|
As a developer
|
|
|
|
I want to be able to use a service that requires Digest Authentication
|
|
|
|
Because that is not an uncommon requirement
|
|
|
|
|
|
|
|
Scenario: Passing no credentials to a page requiring Digest Authentication
|
2010-07-07 08:54:22 -04:00
|
|
|
Given a restricted page at '/digest_auth.html'
|
|
|
|
When I call HTTParty#get with '/digest_auth.html'
|
2010-04-26 21:32:30 -04:00
|
|
|
Then it should return a response with a 401 response code
|
|
|
|
|
|
|
|
Scenario: Passing proper credentials to a page requiring Digest Authentication
|
|
|
|
Given a remote service that returns 'Digest Authenticated Page'
|
2010-07-07 08:54:22 -04:00
|
|
|
And that service is accessed at the path '/digest_auth.html'
|
2010-04-26 21:32:30 -04:00
|
|
|
And that service is protected by Digest Authentication
|
|
|
|
And that service requires the username 'jcash' with the password 'maninblack'
|
2010-07-07 08:54:22 -04:00
|
|
|
When I call HTTParty#get with '/digest_auth.html' and a digest_auth hash:
|
2010-04-26 21:32:30 -04:00
|
|
|
| username | password |
|
|
|
|
| jcash | maninblack |
|
|
|
|
Then the return value should match 'Digest Authenticated Page'
|