+ @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())
+ }
+ }
+