projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace delete sone page with Kotlin version
[Sone.git]
/
src
/
test
/
kotlin
/
net
/
pterodactylus
/
sone
/
web
/
LogoutPageTest.kt
diff --git
a/src/test/kotlin/net/pterodactylus/sone/web/LogoutPageTest.kt
b/src/test/kotlin/net/pterodactylus/sone/web/LogoutPageTest.kt
index
65b75e0
..
8120b50
100644
(file)
--- a/
src/test/kotlin/net/pterodactylus/sone/web/LogoutPageTest.kt
+++ b/
src/test/kotlin/net/pterodactylus/sone/web/LogoutPageTest.kt
@@
-1,7
+1,6
@@
package net.pterodactylus.sone.web
import net.pterodactylus.sone.test.whenever
package net.pterodactylus.sone.web
import net.pterodactylus.sone.test.whenever
-import net.pterodactylus.sone.web.WebTestUtils.redirectsTo
import org.hamcrest.MatcherAssert.assertThat
import org.hamcrest.Matchers.equalTo
import org.junit.Test
import org.hamcrest.MatcherAssert.assertThat
import org.hamcrest.Matchers.equalTo
import org.junit.Test
@@
-14,12
+13,11
@@
class LogoutPageTest : WebPageTest() {
private val page = LogoutPage(template, webInterface)
private val page = LogoutPage(template, webInterface)
+ override fun getPage() = page
+
@Test
fun `page unsets current sone and redirects to index`() {
@Test
fun `page unsets current sone and redirects to index`() {
- expectedException.expect(redirectsTo("index.html"))
- try {
- page.handleRequest(freenetRequest, templateContext)
- } finally {
+ verifyRedirect("index.html") {
verify(webInterface).setCurrentSone(toadletContext, null)
}
}
verify(webInterface).setCurrentSone(toadletContext, null)
}
}