projects
/
Sone.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
c950203
)
Add some missing tests for write access
author
David ‘Bombe’ Roden
<bombe@pterodactylus.net>
Sun, 15 Jan 2017 09:26:48 +0000
(10:26 +0100)
committer
David ‘Bombe’ Roden
<bombe@pterodactylus.net>
Sun, 15 Jan 2017 09:26:48 +0000
(10:26 +0100)
src/test/kotlin/net/pterodactylus/sone/fcp/GetSonesCommandTest.kt
patch
|
blob
|
history
src/test/kotlin/net/pterodactylus/sone/fcp/LikePostCommandTest.kt
patch
|
blob
|
history
src/test/kotlin/net/pterodactylus/sone/fcp/LikeReplyCommandTest.kt
patch
|
blob
|
history
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
(file)
--- 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
}
@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
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
(file)
--- 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
}
@Test
+ fun `command requires write access`() {
+ assertThat(command.requiresWriteAccess(), equalTo(true))
+ }
+
+ @Test
fun `request without parameters results in FCP exception`() {
requestWithoutAnyParameterResultsInFcpException()
}
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
(file)
--- 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
}
@Test
+ fun `command requires write access`() {
+ assertThat(command.requiresWriteAccess(), equalTo(true))
+ }
+
+ @Test
fun `request without parameters results in FCP exception`() {
requestWithoutAnyParameterResultsInFcpException()
}
fun `request without parameters results in FCP exception`() {
requestWithoutAnyParameterResultsInFcpException()
}