atmos/warden-github — pull request #21 by fphilipe (2013-02-05 07:52:48+00:00)
Title: Integration test

These are the integration specs that are added:

- when accessing a protected url
- redirects to GitHub for authentication
- when redirected back from GitHub
- exchanges the code for an access token
- and the returned state does not match the initial state
- fails authentication
- and GitHub rejects the code while exchanging it for an access token
fails authentication
- and code was exchanged for an access token
- redirects back to the original path
- when not inside OAuth flow
- does not recognize a seeming callback url as an actual callback
- when already authenticated
- does not perform the OAuth flow again

The test coverage is now at 100% (SimpleCov reports less but that is because of ruby 1.8/1.9 branching)