Search in sources :

Example 1 with RqWithHeaders

use of org.takes.rq.RqWithHeaders in project wring by yegor256.

the class TkAppTest method rendersHomePage.

/**
 * App can render front page.
 * @throws Exception If some problem inside
 */
@Test
public void rendersHomePage() throws Exception {
    final Take take = new TkApp(new FkBase());
    MatcherAssert.assertThat(XhtmlMatchers.xhtml(new RsPrint(take.act(new RqWithHeaders(new RqFake("GET", "/"), "Accept: text/xml"))).printBody()), XhtmlMatchers.hasXPaths("/page/millis", "/page/links/link[@rel='takes:github']"));
}
Also used : Take(org.takes.Take) FkBase(io.wring.fake.FkBase) RqFake(org.takes.rq.RqFake) RsPrint(org.takes.rs.RsPrint) RqWithHeaders(org.takes.rq.RqWithHeaders) Test(org.junit.Test)

Aggregations

FkBase (io.wring.fake.FkBase)1 Test (org.junit.Test)1 Take (org.takes.Take)1 RqFake (org.takes.rq.RqFake)1 RqWithHeaders (org.takes.rq.RqWithHeaders)1 RsPrint (org.takes.rs.RsPrint)1