Search in sources :

Example 21 with JsonResponse

use of org.hisp.dhis.jsontree.JsonResponse in project dhis2-core by dhis2.

the class RequestInfoControllerTest method testGetCurrentInfo_XRequestIdHeader.

@Test
void testGetCurrentInfo_XRequestIdHeader() {
    JsonResponse info = GET("/request", Header("X-Request-ID", "abc")).content();
    assertTrue(info.isObject());
    assertEquals("abc", info.getString("headerXRequestID").string());
}
Also used : JsonResponse(org.hisp.dhis.jsontree.JsonResponse) Test(org.junit.jupiter.api.Test) DhisControllerConvenienceTest(org.hisp.dhis.webapi.DhisControllerConvenienceTest)

Aggregations

JsonResponse (org.hisp.dhis.jsontree.JsonResponse)21 DhisControllerConvenienceTest (org.hisp.dhis.webapi.DhisControllerConvenienceTest)18 Test (org.junit.jupiter.api.Test)18 Map (java.util.Map)11 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)11 JsonNode (org.hisp.dhis.jsontree.JsonNode)11 SQLException (java.sql.SQLException)2 JsonString (org.hisp.dhis.jsontree.JsonString)2 JsonValue (org.hisp.dhis.jsontree.JsonValue)2 JsonUser (org.hisp.dhis.webapi.json.domain.JsonUser)2 JsonArray (org.hisp.dhis.jsontree.JsonArray)1 JsonObject (org.hisp.dhis.jsontree.JsonObject)1 User (org.hisp.dhis.user.User)1 UserAuthorityGroup (org.hisp.dhis.user.UserAuthorityGroup)1 JsonFollowupValue (org.hisp.dhis.webapi.json.domain.JsonFollowupValue)1 JsonTranslation (org.hisp.dhis.webapi.json.domain.JsonTranslation)1