-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Remove promotion from cancellations spec #5639
Conversation
This promotion isn't necessary for testing the rounding here. We can just use a manual adjustment.
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
There was a problem hiding this 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, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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: