Unit test to replicate dev/core#1317
authorJitendra Purohit <jitendra@fuzion.co.nz>
Tue, 15 Oct 2019 07:29:29 +0000 (12:59 +0530)
committerJitendra Purohit <jitendra@fuzion.co.nz>
Tue, 15 Oct 2019 07:29:29 +0000 (12:59 +0530)
tests/phpunit/api/v3/ContributionTest.php

index be3c2059ecd7d5c98f88bf73b61aea3b03455fd9..462b203f317343bd531cb766ed3cbba9185be148 100644 (file)
@@ -4344,6 +4344,9 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
       'contribution_status_id' => 'Completed',
       'trxn_id' => uniqid(),
     ]);
+    $payments = $this->callAPISuccess('Contribution', 'get', ['sequential' => 1])['values'];
+    //Assert if first payment and repeated payment has the same contribution amount.
+    $this->assertEquals($payments[0]['total_amount'], $payments[1]['total_amount']);
     $this->callAPISuccessGetCount('Contribution', [], 2);
   }