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

Remove promotion from cancellations spec #5639

Conversation

mamhoff
Copy link
Contributor

@mamhoff mamhoff commented Feb 3, 2024

Summary

Removes a call to the promotion factories from the cancellations spec.
This promotion isn't necessary for testing the rounding here. We can just use a manual adjustment.

This is extracted from the extraction work in #5634

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

This promotion isn't necessary for testing the rounding here. We can
just use a manual adjustment.
@mamhoff mamhoff requested a review from a team as a code owner February 3, 2024 11:50
@github-actions github-actions bot added the changelog:solidus_core Changes to the solidus_core gem label Feb 3, 2024
Copy link

codecov bot commented Feb 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4b46992) 88.56% compared to head (d9971f3) 88.56%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5639   +/-   ##
=======================================
  Coverage   88.56%   88.56%           
=======================================
  Files         685      685           
  Lines       16408    16408           
=======================================
  Hits        14531    14531           
  Misses       1877     1877           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@kennyadsl kennyadsl left a comment

Choose a reason for hiding this comment

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

I'm assuming there are other places in the codebase where we are testing that we can create an adjustment linking a promotion action as its source.

Before approving, I left a question about something I don't clearly understand, but overall, I'm okay with this change. Thanks, Martin!

@@ -160,7 +158,7 @@
order: order,
amount: 0.01,
label: 'some promo',
source: promotion_action,
source: nil,
Copy link
Member

Choose a reason for hiding this comment

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

Just one doubt: on line 172, it still mentions a 0.01 promotion adjustment. How is it possible if there's no promotion linked anymore here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Promotions without a source are "manual" adjustments, which work the same as promotion adjustments. They get applied before taxes.

@kennyadsl kennyadsl merged commit 637dbad into solidusio:main Feb 22, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:solidus_core Changes to the solidus_core gem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants