projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update jackson dependency to 2.9.1
[Sone.git]
/
src
/
test
/
kotlin
/
net
/
pterodactylus
/
sone
/
web
/
ajax
/
DeletePostAjaxPageTest.kt
diff --git
a/src/test/kotlin/net/pterodactylus/sone/web/ajax/DeletePostAjaxPageTest.kt
b/src/test/kotlin/net/pterodactylus/sone/web/ajax/DeletePostAjaxPageTest.kt
index
a57e66d
..
cee50b9
100644
(file)
--- a/
src/test/kotlin/net/pterodactylus/sone/web/ajax/DeletePostAjaxPageTest.kt
+++ b/
src/test/kotlin/net/pterodactylus/sone/web/ajax/DeletePostAjaxPageTest.kt
@@
-16,8
+16,7
@@
class DeletePostAjaxPageTest : JsonPageTest("deletePost.ajax", pageSupplier = ::
@Test
fun `missing post ID results in invalid id response`() {
@Test
fun `missing post ID results in invalid id response`() {
- assertThat(json.isSuccess, equalTo(false))
- assertThat(json.error, equalTo("invalid-post-id"))
+ assertThatJsonFailed("invalid-post-id")
}
@Test
}
@Test
@@
-27,8
+26,7
@@
class DeletePostAjaxPageTest : JsonPageTest("deletePost.ajax", pageSupplier = ::
whenever(post.sone).thenReturn(sone)
addPost(post, "post-id")
addRequestParameter("post", "post-id")
whenever(post.sone).thenReturn(sone)
addPost(post, "post-id")
addRequestParameter("post", "post-id")
- assertThat(json.isSuccess, equalTo(false))
- assertThat(json.error, equalTo("not-authorized"))
+ assertThatJsonFailed("not-authorized")
}
@Test
}
@Test
@@
-38,7
+36,7
@@
class DeletePostAjaxPageTest : JsonPageTest("deletePost.ajax", pageSupplier = ::
whenever(post.sone).thenReturn(sone)
addPost(post, "post-id")
addRequestParameter("post", "post-id")
whenever(post.sone).thenReturn(sone)
addPost(post, "post-id")
addRequestParameter("post", "post-id")
- assertThat
(json.isSuccess, equalTo(true)
)
+ assertThat
JsonIsSuccessful(
)
verify(core).deletePost(post)
}
verify(core).deletePost(post)
}