X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FDeleteReplyCommandTest.kt;h=41a4c028b6b76f342bbd25fa1418cf3663c0533a;hb=5ab6ee01df9bac0c7bd5d27a6990dfdf60555d0f;hp=013b1c1a676aec7e2b6d8d2f70dbfa36cfaf27cb;hpb=c088dd5a2896d777cc30c5676583782bfa923729;p=Sone.git diff --git a/src/test/kotlin/net/pterodactylus/sone/fcp/DeleteReplyCommandTest.kt b/src/test/kotlin/net/pterodactylus/sone/fcp/DeleteReplyCommandTest.kt index 013b1c1..41a4c02 100644 --- a/src/test/kotlin/net/pterodactylus/sone/fcp/DeleteReplyCommandTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/fcp/DeleteReplyCommandTest.kt @@ -22,7 +22,7 @@ class DeleteReplyCommandTest : SoneCommandTest() { @Test fun `command requires write access`() { - assertThat(command.requiresWriteAccess(), equalTo(true)) + assertThat(command.requiresWriteAccess, equalTo(true)) } @Test @@ -39,7 +39,7 @@ class DeleteReplyCommandTest : SoneCommandTest() { @Test fun `request with remote post reply parameter results in error response`() { parameters += "Reply" to "RemoteReplyId" - whenever(core.getPostReply("RemoteReplyId")).thenReturn(of(remotePostReply)) + whenever(core.getPostReply("RemoteReplyId")).thenReturn(remotePostReply) val response = command.execute(parameters) assertThat(response.replyParameters["Message"], equalTo("Error")) assertThat(response.replyParameters["ErrorCode"], equalTo("401")) @@ -48,7 +48,7 @@ class DeleteReplyCommandTest : SoneCommandTest() { @Test fun `request with local post reply parameter deletes reply`() { parameters += "Reply" to "RemoteReplyId" - whenever(core.getPostReply("RemoteReplyId")).thenReturn(of(localPostReply)) + whenever(core.getPostReply("RemoteReplyId")).thenReturn(localPostReply) val response = command.execute(parameters) assertThat(response.replyParameters["Message"], equalTo("ReplyDeleted")) verify(core).deleteReply(localPostReply)