2015-11-19 14:39:21 -08:00
|
|
|
import org.junit.*;
|
|
|
|
|
2017-02-24 10:14:47 -08:00
|
|
|
import play.twirl.api.Content;
|
|
|
|
|
2015-11-19 14:39:21 -08:00
|
|
|
|
|
|
|
import static play.test.Helpers.*;
|
2017-02-24 10:14:47 -08:00
|
|
|
import static org.fest.assertions.api.Assertions.*;
|
2015-11-19 14:39:21 -08:00
|
|
|
|
|
|
|
|
|
|
|
public class ApplicationTest {
|
|
|
|
|
|
|
|
private static String TEST_USER = "test";
|
|
|
|
private static String FAKE_CSRF_TOKEN = "token";
|
|
|
|
@Test
|
|
|
|
public void renderTemplate() {
|
2017-02-24 10:14:47 -08:00
|
|
|
Content html = views.html.index.render(TEST_USER, FAKE_CSRF_TOKEN, true, 1234);
|
2015-11-19 14:39:21 -08:00
|
|
|
assertThat(contentType(html)).isEqualTo("text/html");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|