X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FDeletePostCommandTest.kt;fp=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FDeletePostCommandTest.kt;h=751ad240688ecd81981dde0bb7d850c18b2465cf;hb=c088dd5a2896d777cc30c5676583782bfa923729;hp=a2b41983c9a7b4b791c4f6786495b90d590cc3ed;hpb=7522c3e795b53134beadd21c2e72fe48500bde6a;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 a2b4198..751ad24 100644 --- a/src/test/kotlin/net/pterodactylus/sone/fcp/DeletePostCommandTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/fcp/DeletePostCommandTest.kt @@ -31,13 +31,13 @@ class DeletePostCommandTest : SoneCommandTest() { @Test fun `request with invalid post parameter results in fcp exception`() { - parameters.putSingle("Post", "InvalidPostId") + parameters += "Post" to "InvalidPostId" executeCommandAndExpectFcpException() } @Test fun `request with post from remote sone returns error response`() { - parameters.putSingle("Post", "RemotePostId") + parameters += "Post" to "RemotePostId" whenever(core.getPost("RemotePostId")).thenReturn(of(postFromRemoteSone)) val response = command.execute(parameters) assertThat(response.replyParameters["Message"], equalTo("Error")) @@ -46,7 +46,7 @@ class DeletePostCommandTest : SoneCommandTest() { @Test fun `request with post from local sone deletes posts`() { - parameters.putSingle("Post", "LocalPostId") + parameters += "Post" to "LocalPostId" whenever(core.getPost("LocalPostId")).thenReturn(of(postFromLocalSone)) val response = command.execute(parameters) assertThat(response.replyParameters["Message"], equalTo("PostDeleted"))