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

Replace create with build_stubbed in address model specs #6065

Merged
merged 1 commit into from
Sep 26, 2020
Merged

Replace create with build_stubbed in address model specs #6065

merged 1 commit into from
Sep 26, 2020

Conversation

arku
Copy link
Contributor

@arku arku commented Sep 21, 2020

What? Why?

Related to #6062

We don't need objects in the database for the unit tests most of the time. This PR replaces FactoryBot::Syntax::Methods#create calls with FactoryBot::Syntax::Methods#build_stubbed in the Address model specs wherever possible.

What should we test?

Release notes

Changelog Category: Added | Changed | Deprecated | Removed | Fixed | Security

Discourse thread

Dependencies

Documentation updates

@arku
Copy link
Contributor Author

arku commented Sep 21, 2020

This is weird. The model specs pass locally 😕

@luisramos0
Copy link
Contributor

ah, yes, there's something I cant understand with this spec. I struggled here recently when moving some code from spree.
Maybe we can leave it as is for now.

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.

something funny with this address spec... the build is broken.

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.

nice catch 👏 👏 👏

@luisramos0 luisramos0 merged commit d5ab3b4 into openfoodfoundation:master Sep 26, 2020
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.

2 participants