✨ Annotate DeleteSonePage with MenuName
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 17 May 2019 10:06:13 +0000 (12:06 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 17 May 2019 10:06:13 +0000 (12:06 +0200)
src/main/kotlin/net/pterodactylus/sone/web/pages/DeleteSonePage.kt
src/test/kotlin/net/pterodactylus/sone/web/pages/DeleteSonePageTest.kt

index 1d39011..972e444 100644 (file)
@@ -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) {
 
index b4031b1..5551e76 100644 (file)
@@ -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<DeleteSonePage>(), notNullValue())
        }
 
+       @Test
+       fun `page is annotated with correct menuname`() {
+           assertThat(page.menuName, equalTo("DeleteSone"))
+       }
+
 }