From: David ‘Bombe’ Roden Date: Fri, 17 May 2019 09:48:35 +0000 (+0200) Subject: ✨ Annotate EditProfilePage with MenuName X-Git-Tag: v79^2~41 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=58cf2922c76f6c75c55d2835cae2d18930c65cfc;p=Sone.git ✨ Annotate EditProfilePage with MenuName --- diff --git a/src/main/kotlin/net/pterodactylus/sone/web/pages/EditProfilePage.kt b/src/main/kotlin/net/pterodactylus/sone/web/pages/EditProfilePage.kt index 7999c8f..e2392b4 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/pages/EditProfilePage.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/pages/EditProfilePage.kt @@ -13,6 +13,7 @@ import javax.inject.Inject /** * This page lets the user edit her profile. */ +@MenuName("EditProfile") class EditProfilePage @Inject constructor(template: Template, webInterface: WebInterface) : LoggedInPage("editProfile.html", template, "Page.EditProfile.Title", webInterface) { diff --git a/src/test/kotlin/net/pterodactylus/sone/web/pages/EditProfilePageTest.kt b/src/test/kotlin/net/pterodactylus/sone/web/pages/EditProfilePageTest.kt index 98b1f6c..45af39d 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/pages/EditProfilePageTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/pages/EditProfilePageTest.kt @@ -6,6 +6,7 @@ import net.pterodactylus.sone.test.getInstance import net.pterodactylus.sone.test.mock 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.contains @@ -225,4 +226,9 @@ class EditProfilePageTest: WebPageTest(::EditProfilePage) { assertThat(baseInjector.getInstance(), notNullValue()) } + @Test + fun `page is annotated with correct menuname`() { + assertThat(page.menuName, equalTo("EditProfile")) + } + }