Skip to content

Do not stub RequestStore in feature spec#22807

Open
oliverguenther wants to merge 2 commits intodevfrom
chore/dont-stub-auth-features
Open

Do not stub RequestStore in feature spec#22807
oliverguenther wants to merge 2 commits intodevfrom
chore/dont-stub-auth-features

Conversation

@oliverguenther
Copy link
Copy Markdown
Member

The way we set up most specs (controller and features) has shadowed a bug in the before_action setup of the 2FA controllers:

login_as(user) is correctly setting up a cookie, but also stubbing the RequestStore, in all specs whether they are features or not.

In this case, a before_action was called before find_current_user was called. So User.current was not correct, but that only showed outside of specs, as the stub correctly sets it up regardless of execution order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants