X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FDeletePostCommandTest.kt;h=651614f38bf83e748baabf8e16e8d2431a665d0f;hp=751ad240688ecd81981dde0bb7d850c18b2465cf;hb=5ab6ee01df9bac0c7bd5d27a6990dfdf60555d0f;hpb=c088dd5a2896d777cc30c5676583782bfa923729 diff --git a/src/test/kotlin/net/pterodactylus/sone/fcp/DeletePostCommandTest.kt b/src/test/kotlin/net/pterodactylus/sone/fcp/DeletePostCommandTest.kt index 751ad24..651614f 100644 --- a/src/test/kotlin/net/pterodactylus/sone/fcp/DeletePostCommandTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/fcp/DeletePostCommandTest.kt @@ -21,7 +21,7 @@ class DeletePostCommandTest : SoneCommandTest() { @Test fun `command requires write access`() { - assertThat(command.requiresWriteAccess(), equalTo(true)) + assertThat(command.requiresWriteAccess, equalTo(true)) } @Test @@ -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)