-
-
Notifications
You must be signed in to change notification settings - Fork 824
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 contribution page pledge tests to create valid contributions #20404
Conversation
This addresses an issue where they were using a contribution page with a price set but te submit params were not valid for that price set
(Standard links)
|
@@ -1795,26 +1793,26 @@ public function testSubmitPledgePaymentPaymentProcessorRecurFuturePayment() { | |||
|
|||
// Check if pledge created. | |||
$pledge = $this->callAPISuccess('pledge', 'getsingle', []); | |||
$this->assertEquals(date('Ymd', strtotime($pledge['pledge_start_date'])), date('Ymd', strtotime("+1 month"))); | |||
$this->assertEquals($pledge['pledge_amount'], 300.00); | |||
$this->assertEquals(date('Ymd', strtotime($pledge['pledge_start_date'])), date('Ymd', strtotime('+1 month'))); |
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.
The configured value just happens to be 30 rather than 300 - change tests to match
$this->assertEquals(1, $pledgePayment[2]['status_id'], 'This pledge payment should have been completed'); | ||
$this->assertEquals($contribution['id'], $pledgePayment[2]['contribution_id']); | ||
$this->assertEquals($pledgePayment[2]['contribution_id'], $contribution['id']); |
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.
@eileenmcnaughton wasn't this around the right way before?
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.
Yeah maybe - can I fix that as a follow up?
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.
as long as you promise to do so
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've added it into #20402
This all seems fine |
Overview
Fix contribution page pledge tests to create valid contributions
Before
configured contribution page is a price set page but amount being passed instead of price set params
After
price set params passed
Technical Details
Comments