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

Fix test to use valid financials #20676

Merged
merged 1 commit into from
Jul 1, 2021
Merged

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Fix test to use valid financials

Before

The test tries to mimic a change in line items by just deleting the line items from a valid order, creating an invalid order with mismatched financials

After

Switches to deleting the contribution and creating a new one with valid line items -
which is what we would expect 'real live' code to do

Technical Details

Fix towards extending financial verification

Comments

The test tries to mimic a change in line items by just deleting the line items from a valid order. This
fix switches to deleting the contribution and creating a new one with valid line items -
which is what we would expect the code to do
@civibot
Copy link

civibot bot commented Jun 20, 2021

(Standard links)

@civibot civibot bot added the master label Jun 20, 2021
@@ -485,6 +473,7 @@ public function validateAllCounts(int $membershipId, int $count): void {
$lineItemParams = [
'entity_id' => $membershipId,
'entity_table' => 'civicrm_membership',
'contribution_id' => ['>' => 0],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because deleting a contribution leaves orphan line items - which might or might not be a good thing but out of scope of this change

@colemanw colemanw merged commit 7642e55 into civicrm:master Jul 1, 2021
@colemanw colemanw deleted the recur branch July 1, 2021 14:51
@colemanw
Copy link
Member

colemanw commented Jul 1, 2021

It works :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants