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

DRY-up BogusCreditCard model and remove invasive refund spec stub #4002

Merged
merged 2 commits into from
Apr 1, 2021

Conversation

spaghetticode
Copy link
Member

Description

This PR includes 2 commits that were originally proposed with this bugfix that targets v2.11. They're proposed also for the master branch, as they can be beneficial here as well.

Checklist:

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have updated Guides and README accordingly to this change (if needed)
  • I have added tests to cover this change (if needed)
  • I have attached screenshots to this PR for visual changes (if needed)

Success and failure messages are hardcoded in multiple methods, they
can be easily DRYed up by using constants, with the extra benefit that
these can be referenced also in subclasses and tests.
Stubs can make tests britte, especially ones that, although
presented in a unit test file, are actually integrating the
behavior of many classes. Specifically, being this stub defined
at the top level, it prevents writing specs that actually want
to hit the real implementation of the stubbed method. These seem
good enough reasons for removing it.
@kennyadsl kennyadsl merged commit 1856bf4 into solidusio:master Apr 1, 2021
@kennyadsl kennyadsl deleted the spaghetticode/models-cleanup branch April 1, 2021 06: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.

3 participants