X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FDeletePostCommandTest.kt;h=30fc4cb1b4ef7a9da32e072591561c96129d56f9;hb=fd32e307db87c617a4c455f592b6e649ec50ae8a;hp=751ad240688ecd81981dde0bb7d850c18b2465cf;hpb=ffd92ca2374c0b2218e583d02e0bdd24b8c110ae;p=Sone.git diff --git a/src/test/kotlin/net/pterodactylus/sone/fcp/DeletePostCommandTest.kt b/src/test/kotlin/net/pterodactylus/sone/fcp/DeletePostCommandTest.kt index 751ad24..30fc4cb 100644 --- a/src/test/kotlin/net/pterodactylus/sone/fcp/DeletePostCommandTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/fcp/DeletePostCommandTest.kt @@ -38,7 +38,7 @@ class DeletePostCommandTest : SoneCommandTest() { @Test fun `request with post from remote sone returns error response`() { parameters += "Post" to "RemotePostId" - whenever(core.getPost("RemotePostId")).thenReturn(of(postFromRemoteSone)) + whenever(core.getPost("RemotePostId")).thenReturn(postFromRemoteSone) val response = command.execute(parameters) assertThat(response.replyParameters["Message"], equalTo("Error")) assertThat(response.replyParameters["ErrorCode"], equalTo("401")) @@ -47,7 +47,7 @@ class DeletePostCommandTest : SoneCommandTest() { @Test fun `request with post from local sone deletes posts`() { parameters += "Post" to "LocalPostId" - whenever(core.getPost("LocalPostId")).thenReturn(of(postFromLocalSone)) + whenever(core.getPost("LocalPostId")).thenReturn(postFromLocalSone) val response = command.execute(parameters) assertThat(response.replyParameters["Message"], equalTo("PostDeleted")) verify(core).deletePost(postFromLocalSone)