+ @Test
+ fun `index page without posts sets correct pagination`() {
+ core.preferences.postsPerPage = 1
+ page.processTemplate(freenetRequest, templateContext)
+ @Suppress("UNCHECKED_CAST")
+ (templateContext["pagination"] as Pagination<Post>).let { pagination ->
+ assertThat(pagination.items, emptyIterable())
+ }
+ }
+
+ @Test
+ fun `page can be created by dependency injection`() {
+ assertThat(baseInjector.getInstance<IndexPage>(), notNullValue())
+ }
+