Add some tests for edit profile field page
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 8 Apr 2017 17:03:52 +0000 (19:03 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 8 Apr 2017 17:03:52 +0000 (19:03 +0200)
src/test/kotlin/net/pterodactylus/sone/web/pages/EditProfileFieldPageTest.kt

index cbe1289..0990ece 100644 (file)
@@ -31,6 +31,22 @@ class EditProfileFieldPageTest : WebPageTest() {
        }
 
        @Test
+       fun `page returns correct path`() {
+           assertThat(page.path, equalTo("editProfileField.html"))
+       }
+
+       @Test
+       fun `page requires login`() {
+           assertThat(page.requiresLogin(), equalTo(true))
+       }
+
+       @Test
+       fun `page returns correct title`() {
+               whenever(l10n.getString("Page.EditProfileField.Title")).thenReturn("edit profile field title")
+           assertThat(page.getPageTitle(freenetRequest), equalTo("edit profile field title"))
+       }
+
+       @Test
        fun `get request with invalid field redirects to invalid page`() {
                request("", GET)
                verifyRedirect("invalid.html")