- fun `get request stores parameters in template context`() {
- addHttpRequestParameter("returnPage", "return.html")
- addHttpRequestParameter("post", "post-id")
- addHttpRequestParameter("text", "new text")
- page.processTemplate(freenetRequest, templateContext)
- assertThat(templateContext["returnPage"], equalTo<Any>("return.html"))
- assertThat(templateContext["postId"], equalTo<Any>("post-id"))
- assertThat(templateContext["text"], equalTo<Any>("new text"))
+ fun `page can be created by dependency injection`() {
+ assertThat(baseInjector.getInstance<CreateReplyPage>(), notNullValue())
+ }
+
+ @Test
+ fun `page is annotated with correct template path`() {
+ assertThat(page.templatePath, equalTo("/templates/createReply.html"))