From: David ‘Bombe’ Roden Date: Fri, 17 May 2019 10:06:13 +0000 (+0200) Subject: ✨ Annotate DeleteSonePage with MenuName X-Git-Tag: v79^2~38 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=c8da3580df266dc7dc2d16d5d24083f2e5bcd6d0;p=Sone.git ✨ Annotate DeleteSonePage with MenuName --- diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/DeleteSonePage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/DeleteSonePage.kt index 1d39011..972e444 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/DeleteSonePage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/DeleteSonePage.kt @@ -13,6 +13,7 @@ import javax.inject.Inject * Freenet; merely all references to it are removed from the local plugin * installation. */ +@MenuName("DeleteSone") class DeleteSonePage @Inject constructor(template: Template, webInterface: WebInterface): LoggedInPage("deleteSone.html", template, "Page.DeleteSone.Title", webInterface) { diff --git a/src/test/kotlin/net/pterodactylus/sone/web/pages/DeleteSonePageTest.kt b/src/test/kotlin/net/pterodactylus/sone/web/pages/DeleteSonePageTest.kt index b4031b1..5551e76 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/pages/DeleteSonePageTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/pages/DeleteSonePageTest.kt @@ -3,6 +3,7 @@ package net.pterodactylus.sone.web.pages import net.pterodactylus.sone.test.getInstance import net.pterodactylus.sone.test.whenever import net.pterodactylus.sone.web.baseInjector +import net.pterodactylus.sone.web.page.* import net.pterodactylus.util.web.Method.POST import org.hamcrest.MatcherAssert.assertThat import org.hamcrest.Matchers.equalTo @@ -60,4 +61,9 @@ class DeleteSonePageTest: WebPageTest(::DeleteSonePage) { assertThat(baseInjector.getInstance(), notNullValue()) } + @Test + fun `page is annotated with correct menuname`() { + assertThat(page.menuName, equalTo("DeleteSone")) + } + }