From da77cbbd762c281842e455f7876ea70ea72b1fc2 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Wed, 8 Jul 2015 00:11:12 +1200 Subject: [PATCH] slight enhancement to test Conflicts: tests/phpunit/CRM/Contribute/Form/ContributionTest.php --- tests/phpunit/CRM/Contribute/Form/ContributionTest.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/CRM/Contribute/Form/ContributionTest.php b/tests/phpunit/CRM/Contribute/Form/ContributionTest.php index 8410a75742..c868dd5e02 100644 --- a/tests/phpunit/CRM/Contribute/Form/ContributionTest.php +++ b/tests/phpunit/CRM/Contribute/Form/ContributionTest.php @@ -483,10 +483,13 @@ class CRM_Contribute_Form_ContributionTest extends CiviUnitTestCase { 'id' => $contribution['id'], ), CRM_Core_Action::UPDATE); - $this->callAPISuccessGetCount('Contribution', array('contact_id' => $this->_individualId), 1); + $contribution = $this->callAPISuccessGetSingle('Contribution', array('contact_id' => $this->_individualId)); + $this->assertEquals(45, (int) $contribution['total_amount']); + $financialTransactions = $this->callAPISuccess('FinancialTrxn', 'get', array('sequential' => TRUE)); $this->assertEquals(2, $financialTransactions['count']); $this->assertEquals(50, $financialTransactions['values'][0]['total_amount']); + $this->assertEquals(45, $financialTransactions['values'][1]['net_amount']); $this->assertEquals(45, $financialTransactions['values'][1]['total_amount']); $lineItem = $this->callAPISuccessGetSingle('LineItem', array()); $this->assertEquals(45, $lineItem['line_total']); -- 2.25.1