Skip to content

Commit

Permalink
Merge pull request #13908 from eileenmcnaughton/report_filter
Browse files Browse the repository at this point in the history
Add unit test for #13158
  • Loading branch information
eileenmcnaughton authored Mar 28, 2019
2 parents 0376244 + 34496b9 commit a7f476a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/phpunit/api/v3/ReportTemplateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1089,6 +1089,22 @@ public function testContributionDetailTotalHeader() {
));
}

/**
* Test contact subtype filter on grant report.
*/
public function testGrantReportSeparatedFilter() {
$contactID = $this->individualCreate(['contact_sub_type' => ['Student', 'Parent']]);
$contactID2 = $this->individualCreate();
$this->callAPISuccess('Grant', 'create', ['contact_id' => $contactID, 'status_id' => 1, 'grant_type_id' => 1, 'amount_total' => 1]);
$this->callAPISuccess('Grant', 'create', ['contact_id' => $contactID2, 'status_id' => 1, 'grant_type_id' => 1, 'amount_total' => 1]);
$rows = $this->callAPISuccess('report_template', 'getrows', [
'report_id' => 'grant/detail',
'contact_sub_type_op' => 'in',
'contact_sub_type_value' => ['Student'],
]);
$this->assertEquals(1, $rows['count']);
}

/**
* Test PCP report to ensure total donors and total committed is accurate.
*/
Expand Down

0 comments on commit a7f476a

Please sign in to comment.