@Test
fun `page returns correct title`() {
addTranslation("Page.UploadImage.Title", "upload image page title")
- assertThat(page.getPageTitle(freenetRequest), equalTo("upload image page title"))
+ assertThat(page.getPageTitle(soneRequest), equalTo("upload image page title"))
}
@Test
fun `post request with parent that is not the current sone results in no permission error page`() {
setMethod(POST)
addHttpRequestPart("parent", "parent-id")
- whenever(parentAlbum.sone).thenReturn(mock<Sone>())
+ whenever(parentAlbum.sone).thenReturn(mock())
addAlbum("parent-id", parentAlbum)
verifyRedirect("noPermission.html")
}