Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue #1832] Refactor omniauth callbacks controller spec to request spec #1907

Conversation

camilacampos
Copy link
Contributor

Description

This refactors the tests associated with the SecretSharesController to use RSpec request type tests instead of controller

Corresponding Issue

Fixes #1832
Parent issue: #1815


Reviewing this pull request? Check out our Code Review Practices guide if you haven't already!

@camilacampos camilacampos self-assigned this Oct 13, 2020
Copy link
Member

@bennpham bennpham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really good job on this test! I was wondering about how to go about with stubbing the omniauth calls myself when I took a look at this myself so I thought this was a trickier one. I got a few comments around to make the test a bit neater, but overall, this is really good! I'd probably move some of those methods in this test to a stub_omniauth.rb spec support to separate the concerns and in case there's a different test that would require stubbing omniauth as well.

spec/requests/omniauth_callbacks_spec.rb Outdated Show resolved Hide resolved
spec/requests/omniauth_callbacks_spec.rb Outdated Show resolved Hide resolved
spec/requests/omniauth_callbacks_spec.rb Outdated Show resolved Hide resolved
spec/requests/omniauth_callbacks_spec.rb Show resolved Hide resolved
spec/requests/omniauth_callbacks_spec.rb Outdated Show resolved Hide resolved
spec/requests/omniauth_callbacks_spec.rb Outdated Show resolved Hide resolved
spec/requests/omniauth_callbacks_spec.rb Outdated Show resolved Hide resolved
spec/requests/omniauth_callbacks_spec.rb Outdated Show resolved Hide resolved
Copy link
Member

@bennpham bennpham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

@camilacampos camilacampos merged commit 0e5303c into ifmeorg:main Oct 14, 2020
@camilacampos camilacampos deleted the issue-1832/refactor_omniauth_callbacks_controller_spec branch October 14, 2020 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor spec/controllers/omniauth_callbacks_controller_spec.rb to spec/request/omniauth_callback_spec.rb
3 participants