alphagov/smokey — pull request #6 by jabley (2012-09-25 13:55:58+00:00)
Title: EFG login check

Smokey test to ensure that we can login to EFG at all times.

Only other thing of note is the addition in http_steps.rb of support for making POST requests. Comments welcome over the chosen method signatures for this.

I didn't find anything that supported this already so I added it. The implementation deviates from the [suggested way to support redirect responses being returned to POST requests](https://github.com/archiloque/rest-client#result-handling); I tried it like that and it failed due to retrying the POST request using the Location URL, which isn't what a browser will do. A browser treats the 302 that comes back as a 303 and converts the POST to a GET when following the redirect Location. Arguably I should look at devise or EFG itself to see what issues this 302 and change it to be a 303.

I originally pushed this with a username and password in the steps, then deleted the branch immediately. Whoops!

This version now expects those to be in the environment variables, similar to how the existing HTTP Basic Auth credentials are set. If they aren't available, then it will fail.

I'll add the environment variables in Jenkins.