From c8da3580df266dc7dc2d16d5d24083f2e5bcd6d0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 17 May 2019 12:06:13 +0200 Subject: [PATCH] =?utf8?q?=E2=9C=A8=20Annotate=20DeleteSonePage=20with=20M?= =?utf8?q?enuName?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/kotlin/net/pterodactylus/sone/web/pages/DeleteSonePage.kt | 1 + .../kotlin/net/pterodactylus/sone/web/pages/DeleteSonePageTest.kt | 6 ++++++ 2 files changed, 7 insertions(+) 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")) + } + } -- 2.7.4