You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by al...@apache.org on 2021/03/14 14:06:05 UTC
[fineract] 05/05: Add Integration Test for reportCategoryList
(FINERACT-1306)
This is an automated email from the ASF dual-hosted git repository.
aleks pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git
commit 684357c06304fde4736dd12d16084b6cd360d4a9
Author: Michael Vorburger <mi...@vorburger.ch>
AuthorDate: Sun Feb 7 22:22:26 2021 +0100
Add Integration Test for reportCategoryList (FINERACT-1306)
---
.../fineract/integrationtests/client/ReportsTest.java | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/client/ReportsTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/client/ReportsTest.java
index d57f922..f1eda5f 100644
--- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/client/ReportsTest.java
+++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/client/ReportsTest.java
@@ -18,8 +18,10 @@
*/
package org.apache.fineract.integrationtests.client;
+import java.io.IOException;
import java.util.Map;
import okhttp3.MediaType;
+import okhttp3.Request;
import okhttp3.ResponseBody;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
@@ -42,6 +44,18 @@ public class ReportsTest extends IntegrationTest {
.getColumnName()).isEqualTo("Office/Branch");
}
+ @Test // see FINERACT-1306
+ void runReportCategory() throws IOException {
+ // Using raw OkHttp instead of Retrofit API here, because /runreports/reportCategoryList returns JSON Array -
+ // but runReportGetData() expects columnHeaders/data JSON.
+ var req = new Request.Builder().url(fineract().baseURL().resolve(
+ "/fineract-provider/api/v1/runreports/reportCategoryList?R_reportCategory=Fund&genericResultSet=false¶meterType=true&tenantIdentifier=default"))
+ .build();
+ try (var response = fineract().okHttpClient().newCall(req).execute()) {
+ assertThat(response.code()).isEqualTo(200);
+ }
+ }
+
@Test
void runExpectedPaymentsPentahoReportWithoutPlugin() {
assertThat(fineract().reportsRun.runReportGetFile("Expected Payments By Date - Formatted", Map.of("R_endDate", "2013-04-30",