From: David ‘Bombe’ Roden Date: Fri, 17 May 2019 09:45:54 +0000 (+0200) Subject: ✨ Annotate KnownSonesPage with MenuName X-Git-Tag: v79^2~42 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=3db634e425d3482bcf00dfd82e4b0d46785d5959;p=Sone.git ✨ Annotate KnownSonesPage with MenuName --- diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/KnownSonesPage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/KnownSonesPage.kt index 59b79e7..dd96832 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/KnownSonesPage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/KnownSonesPage.kt @@ -12,6 +12,7 @@ import javax.inject.Inject /** * This page shows all known Sones. */ +@MenuName("KnownSones") class KnownSonesPage @Inject constructor(template: Template, webInterface: WebInterface): SoneTemplatePage("knownSones.html", webInterface, template, "Page.KnownSones.Title") { diff --git a/src/test/kotlin/net/pterodactylus/sone/web/pages/KnownSonesPageTest.kt b/src/test/kotlin/net/pterodactylus/sone/web/pages/KnownSonesPageTest.kt index ef837be..bc46b9d 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/pages/KnownSonesPageTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/pages/KnownSonesPageTest.kt @@ -13,6 +13,7 @@ import net.pterodactylus.sone.test.mock import net.pterodactylus.sone.test.whenever import net.pterodactylus.sone.utils.Pagination import net.pterodactylus.sone.web.baseInjector +import net.pterodactylus.sone.web.page.* import org.hamcrest.MatcherAssert.assertThat import org.hamcrest.Matchers.contains import org.hamcrest.Matchers.equalTo @@ -250,4 +251,9 @@ class KnownSonesPageTest: WebPageTest(::KnownSonesPage) { assertThat(baseInjector.getInstance(), notNullValue()) } + @Test + fun `page is annotated with the correct menuname`() { + assertThat(page.menuName, equalTo("KnownSones")) + } + }