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

Perform delivery when checking deliveries in specs #3497

Merged

Conversation

sauloperez
Copy link
Contributor

What? Why?

Closes #3486

Otherwise checking ActionMailer::Base.deliveries.count won't see any email. In test, they won't be sent but put into deliveries.

What should we test?

spec/controllers/user_confirmations_controller_spec.rb:70 should pass

Otherwise checking `ActionMailer::Base.deliveries.count` won't see any.
@sauloperez sauloperez self-assigned this Feb 14, 2019
Copy link
Contributor

@luisramos0 luisramos0 left a comment

Choose a reason for hiding this comment

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

that trick! nice.
do you understand why did this spec break recently only?

@sauloperez
Copy link
Contributor Author

It must be related to ordering and global state. If any other test changes ActionMailer's config chances are that this test depended on it (I guess).

Copy link
Contributor

@Matt-Yorkley Matt-Yorkley left a comment

Choose a reason for hiding this comment

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

👍

@Matt-Yorkley
Copy link
Contributor

Are there other tests that also need the same wrapper?

@sauloperez
Copy link
Contributor Author

This seems to be the last spec that was needing it. Others were already applied.

@sauloperez
Copy link
Contributor Author

The test is passing and the others are already fixed in other PRs.

@sauloperez sauloperez merged commit e67793b into openfoodfoundation:2-0-stable Feb 15, 2019
@sauloperez sauloperez deleted the fix-user-confirmation-spec branch February 15, 2019 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants