/**
* The login page lets the user log in.
*/
+@MenuName("Login")
class LoginPage @Inject constructor(template: Template, webInterface: WebInterface):
SoneTemplatePage("login.html", webInterface, template, "Page.Login.Title") {
import net.pterodactylus.sone.test.thenReturnMock
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
assertThat(baseInjector.getInstance<LoginPage>(), notNullValue())
}
+ @Test
+ fun `page is annotated with correct menuname`() {
+ assertThat(page.menuName, equalTo("Login"))
+ }
+
}