Skip to content

Commit

Permalink
test: added e2e test [DHIS2-16191]
Browse files Browse the repository at this point in the history
  • Loading branch information
gnespolino committed Dec 28, 2023
1 parent ed70c9b commit b90a7f0
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2889,4 +2889,33 @@ public void headerParamIncidentDate() {

validateRow(response, 0, List.of("2022-01-01 12:05:00.0"));
}

@Test
public void headerParamOunameIsPresent() {
// Given
QueryParamsBuilder params = new QueryParamsBuilder().add("headers=IpHINAT79UW.ouname");

// When
ApiResponse response = analyticsTeiActions.query().get("nEenWmSyUEp", JSON, JSON, params);

// Then
response
.validate()
.statusCode(200)
.body("rows", hasSize(equalTo(50)))
.body("height", equalTo(50))
.body("width", equalTo(1))
.body("headerWidth", equalTo(1))
.body("headers", hasSize(equalTo(1)));

validateHeader(
response,
0,
"IpHINAT79UW.ouname",
"Enrollment Organisation unit name",
"TEXT",
"java.lang.String",
false,
true);
}
}

0 comments on commit b90a7f0

Please sign in to comment.