import net.pterodactylus.util.web.Method.POST
import org.hamcrest.MatcherAssert.assertThat
import org.hamcrest.Matchers.contains
import net.pterodactylus.util.web.Method.POST
import org.hamcrest.MatcherAssert.assertThat
import org.hamcrest.Matchers.contains
@Test
fun `page returns correct title`() {
whenever(l10n.getString("Page.EditProfile.Title")).thenReturn("edit profile page title")
@Test
fun `page returns correct title`() {
whenever(l10n.getString("Page.EditProfile.Title")).thenReturn("edit profile page title")
addHttpRequestPart("save-profile", "true")
addHttpRequestPart(fieldName, newValue.toString())
verifyRedirect("editProfile.html") {
addHttpRequestPart("save-profile", "true")
addHttpRequestPart(fieldName, newValue.toString())
verifyRedirect("editProfile.html") {
verify(core).touchConfiguration()
assertThat(fieldAccessor(), equalTo(expectedValue))
}
verify(core).touchConfiguration()
assertThat(fieldAccessor(), equalTo(expectedValue))
}