From ae078c3b54fce575270aae9ec645a286641aea71 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 15 Jan 2017 10:26:48 +0100 Subject: [PATCH] Add some missing tests for write access --- src/test/kotlin/net/pterodactylus/sone/fcp/GetSonesCommandTest.kt | 5 +++++ src/test/kotlin/net/pterodactylus/sone/fcp/LikePostCommandTest.kt | 5 +++++ src/test/kotlin/net/pterodactylus/sone/fcp/LikeReplyCommandTest.kt | 5 +++++ 3 files changed, 15 insertions(+) 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() } -- 2.7.4