From: David ‘Bombe’ Roden Date: Sun, 15 Jan 2017 09:26:48 +0000 (+0100) Subject: Add some missing tests for write access X-Git-Tag: 0.9.7^2~336 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=ae078c3b54fce575270aae9ec645a286641aea71 Add some missing tests for write access --- diff --git a/src/test/kotlin/net/pterodactylus/sone/fcp/GetSonesCommandTest.kt b/src/test/kotlin/net/pterodactylus/sone/fcp/GetSonesCommandTest.kt index f6ec734..0da4f24 100644 --- a/src/test/kotlin/net/pterodactylus/sone/fcp/GetSonesCommandTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/fcp/GetSonesCommandTest.kt @@ -24,6 +24,11 @@ class GetSonesCommandTest : SoneCommandTest() { } @Test + fun `command does not require write access`() { + assertThat(command.requiresWriteAccess(), equalTo(false)) + } + + @Test fun `request without parameters lists all sones`() { val replyParameters = command.execute(parameters).replyParameters diff --git a/src/test/kotlin/net/pterodactylus/sone/fcp/LikePostCommandTest.kt b/src/test/kotlin/net/pterodactylus/sone/fcp/LikePostCommandTest.kt index f88e138..792c1b7 100644 --- a/src/test/kotlin/net/pterodactylus/sone/fcp/LikePostCommandTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/fcp/LikePostCommandTest.kt @@ -29,6 +29,11 @@ class LikePostCommandTest : SoneCommandTest() { } @Test + fun `command requires write access`() { + assertThat(command.requiresWriteAccess(), equalTo(true)) + } + + @Test fun `request without parameters results in FCP exception`() { requestWithoutAnyParameterResultsInFcpException() } diff --git a/src/test/kotlin/net/pterodactylus/sone/fcp/LikeReplyCommandTest.kt b/src/test/kotlin/net/pterodactylus/sone/fcp/LikeReplyCommandTest.kt index b5f7823..d222c27 100644 --- a/src/test/kotlin/net/pterodactylus/sone/fcp/LikeReplyCommandTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/fcp/LikeReplyCommandTest.kt @@ -30,6 +30,11 @@ class LikeReplyCommandTest : SoneCommandTest() { } @Test + fun `command requires write access`() { + assertThat(command.requiresWriteAccess(), equalTo(true)) + } + + @Test fun `request without parameters results in FCP exception`() { requestWithoutAnyParameterResultsInFcpException() }