Fix failing isolated tests#249
Merged
joshbuker merged 1 commit intoSorcery:masterfrom Jul 7, 2020
Merged
Conversation
These tests will fail when run individually, so I fix them.
```console
$ bundle exec rspec spec/controllers/controller_oauth2_spec.rb:118
Failures:
1) SorceryController with OAuth features when callback_url begin with http:// login_at redirects correctly
Failure/Error: expect(response).to redirect_to("https://www.facebook.com/v2.2/dialog/oauth?client_id=#{::Sorcery::Controller::Config.facebook.key}&display=page&redirect_uri=http%3A%2F%2Ftest.host%2Foauth%2Ftwitter%2Fcallback&response_type=code&scope=email&state")
Expected response to be a redirect to <https://www.facebook.com/v2.2/dialog/oauth?client_id=eYVNBjBDi33aa9GkA3w&display=page&redirect_uri=http%3A%2F%2Ftest.host%2Foauth%2Ftwitter%2Fcallback&response_type=code&scope=email&state> but was a redirect to <https://www.facebook.com/dialog/oauth?client_id=eYVNBjBDi33aa9GkA3w&display=page&redirect_uri=http%3A%2F%2Fblabla.com&response_type=code&scope=email&state>.
Expected "https://www.facebook.com/v2.2/dialog/oauth?client_id=eYVNBjBDi33aa9GkA3w&display=page&redirect_uri=http%3A%2F%2Ftest.host%2Foauth%2Ftwitter%2Fcallback&response_type=code&scope=email&state" to be === "https://www.facebook.com/dialog/oauth?client_id=eYVNBjBDi33aa9GkA3w&display=page&redirect_uri=http%3A%2F%2Fblabla.com&response_type=code&scope=email&state".
# ./spec/controllers/controller_oauth2_spec.rb:123:in `block (4 levels) in <top (required)>'
```
```console
$ bundle exec rspec spec/controllers/controller_oauth_spec.rb:86
Failures:
1) SorceryController SorceryController 'using external API to login' when callback_url begin with http:// login_at redirects correctly FIXED
Expected pending 'No reason given' to fail. No error was raised.
# ./spec/controllers/controller_oauth_spec.rb:87
```
2f9274f to
5691e90
Compare
Contributor
Author
|
The commit status is not success, but the test is successful in TravisCI. |
Member
|
Seems TravisCI broke again. I know I had to get in there and fix the hooks, might just need to do that again and see what went wrong. |
joshbuker
approved these changes
Jul 3, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These tests will fail when run individually, so I fix them.