summaryrefslogtreecommitdiff
path: root/sw-server/src/test/kotlin
diff options
context:
space:
mode:
authorjoffrey-bion <joffrey.bion@gmail.com>2020-12-12 02:03:45 +0100
committerjoffrey-bion <joffrey.bion@gmail.com>2020-12-12 02:44:13 +0100
commit9ba1b1251d16956fe3b9cd07f198577b63d4a486 (patch)
treea780a985f022a8ab9699a8990174630089e5feb3 /sw-server/src/test/kotlin
parentImprove score board tags colors (diff)
downloadseven-wonders-9ba1b1251d16956fe3b9cd07f198577b63d4a486.tar.gz
seven-wonders-9ba1b1251d16956fe3b9cd07f198577b63d4a486.tar.bz2
seven-wonders-9ba1b1251d16956fe3b9cd07f198577b63d4a486.zip
Make ready button optional (server side)
Resolves: https://github.com/joffrey-bion/seven-wonders/issues/63
Diffstat (limited to 'sw-server/src/test/kotlin')
-rw-r--r--sw-server/src/test/kotlin/org/luxons/sevenwonders/server/SevenWondersTest.kt4
-rw-r--r--sw-server/src/test/kotlin/org/luxons/sevenwonders/server/controllers/LobbyControllerTest.kt2
2 files changed, 4 insertions, 2 deletions
diff --git a/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/SevenWondersTest.kt b/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/SevenWondersTest.kt
index ccc2e548..3ed559b3 100644
--- a/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/SevenWondersTest.kt
+++ b/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/SevenWondersTest.kt
@@ -150,5 +150,7 @@ class SevenWondersTest {
private suspend fun SevenWondersSession.createGameAndWaitLobby(gameName: String): LobbyDTO {
val joinedLobbies = watchLobbyJoined()
createGame(gameName)
- return joinedLobbies.first()
+ val lobby = joinedLobbies.first()
+ updateSettings(lobby.settings.copy(askForReadiness = true))
+ return lobby
}
diff --git a/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/controllers/LobbyControllerTest.kt b/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/controllers/LobbyControllerTest.kt
index 097e4792..351c2e9e 100644
--- a/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/controllers/LobbyControllerTest.kt
+++ b/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/controllers/LobbyControllerTest.kt
@@ -165,7 +165,7 @@ class LobbyControllerTest {
assertEquals(Settings(), lobby.settings)
- val newSettings = Settings(12L, 5, 5, 5, 4, 10, 2, HashMap())
+ val newSettings = Settings(12L, 5, false, 5, 5, 4, 10, 2, HashMap())
val updateSettingsAction = UpdateSettingsAction(newSettings)
val principal = TestPrincipal("testuser")
bgstack15