Add Integration Test for reportCategoryList (FINERACT-1306)

This commit is contained in:
Michael Vorburger
2021-03-14 15:05:45 +01:00
committed by Aleksandar Vidakovic
parent aaaae3acc0
commit 684357c063
@@ -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&parameterType=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",