Search in sources :

Example 66 with UrlResponse

use of spark.util.SparkTestUtil.UrlResponse in project spark by perwendel.

the class StaticFilesFromArchiveTest method testCss.

@Test
public void testCss() throws Exception {
    UrlResponse response = testUtil.doMethod("GET", "/css/style.css", null);
    String expectedContentType = response.headers.get("Content-Type");
    assertEquals(expectedContentType, "text/css");
    String body = response.body;
    assertEquals("Content of css file", body);
}
Also used : UrlResponse(spark.util.SparkTestUtil.UrlResponse) Test(org.junit.Test)

Aggregations

UrlResponse (spark.util.SparkTestUtil.UrlResponse)66 Test (org.junit.Test)65 HashMap (java.util.HashMap)3 JWGmeligMeylingException (spark.examples.exception.JWGmeligMeylingException)1