X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FLikePostCommandTest.kt;h=86fb586bc799865945bf244d7ec58b50ae2428f0;hb=e7319b53b914961d59b8fce999da75adfab54009;hp=f88e138643152284b7ae63b35a411b65adaff25d;hpb=201ccb643923d7771cba32453279faf0344018f6;p=Sone.git diff --git a/src/test/kotlin/net/pterodactylus/sone/fcp/LikePostCommandTest.kt b/src/test/kotlin/net/pterodactylus/sone/fcp/LikePostCommandTest.kt index f88e138..86fb586 100644 --- a/src/test/kotlin/net/pterodactylus/sone/fcp/LikePostCommandTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/fcp/LikePostCommandTest.kt @@ -17,7 +17,7 @@ import org.mockito.Mockito.verify */ class LikePostCommandTest : SoneCommandTest() { - private val post = createPost("PostId", mock(), null, 1000, "Text") + private val post = createPost("PostId", mock(), null, 1000, "Text") override fun createCommand(core: Core) = LikePostCommand(core) @@ -29,8 +29,13 @@ class LikePostCommandTest : SoneCommandTest() { } @Test + fun `command requires write access`() { + assertThat(command.requiresWriteAccess(), equalTo(true)) + } + + @Test fun `request without parameters results in FCP exception`() { - requestWithoutAnyParameterResultsInFcpException() + requestWithoutAnyParameterResultsInFcpException() } @Test @@ -42,7 +47,7 @@ class LikePostCommandTest : SoneCommandTest() { @Test fun `request with missing local sone results in FCP exception`() { - parameters += "Post" to "PostId" + parameters += "Post" to "PostId" expectedException.expect(FcpException::class.java) command.execute(parameters) }