summaryrefslogtreecommitdiff
path: root/sw-server/src/test/kotlin/org/luxons
diff options
context:
space:
mode:
authorJoffrey Bion <joffrey.bion@booking.com>2020-03-29 18:02:47 +0200
committerJoffrey Bion <joffrey.bion@booking.com>2020-03-29 18:07:31 +0200
commit57a6e5135ee554079c6064bd770d51545800969d (patch)
tree9c688d1fc261cf6740c63a604695f9301220830f /sw-server/src/test/kotlin/org/luxons
parentEnsure error saga starts first (diff)
downloadseven-wonders-57a6e5135ee554079c6064bd770d51545800969d.tar.gz
seven-wonders-57a6e5135ee554079c6064bd770d51545800969d.tar.bz2
seven-wonders-57a6e5135ee554079c6064bd770d51545800969d.zip
Fix duplicated inconsistent state
Diffstat (limited to 'sw-server/src/test/kotlin/org/luxons')
-rw-r--r--sw-server/src/test/kotlin/org/luxons/sevenwonders/server/controllers/GameBrowserControllerTest.kt8
1 files changed, 4 insertions, 4 deletions
diff --git a/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/controllers/GameBrowserControllerTest.kt b/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/controllers/GameBrowserControllerTest.kt
index 804b5f6e..88e04c14 100644
--- a/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/controllers/GameBrowserControllerTest.kt
+++ b/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/controllers/GameBrowserControllerTest.kt
@@ -52,7 +52,7 @@ class GameBrowserControllerTest {
assertFalse(games.isEmpty())
val lobby = games.iterator().next()
assertEquals(lobby, createdLobby)
- assertEquals(player.toDTO(principal.name), lobby.players[0])
+ assertEquals(player.toDTO(), lobby.players[0])
}
@Test
@@ -90,7 +90,7 @@ class GameBrowserControllerTest {
val createGameAction = CreateGameAction("Test Game")
val createdLobby = gameBrowserController.createGame(createGameAction, ownerPrincipal)
- assertEquals(owner.toDTO(ownerPrincipal.name), createdLobby.players[0])
+ assertEquals(owner.toDTO(), createdLobby.players[0])
val joiner = playerRepository.createOrUpdate("testjoiner", "Test User Joiner")
val joinerPrincipal = TestPrincipal("testjoiner")
@@ -98,8 +98,8 @@ class GameBrowserControllerTest {
val joinedLobby = gameBrowserController.joinGame(joinGameAction, joinerPrincipal)
- assertEquals(owner.toDTO(joinerPrincipal.name), joinedLobby.players[0])
- assertEquals(joiner.toDTO(joinerPrincipal.name), joinedLobby.players[1])
+ assertEquals(owner.toDTO(), joinedLobby.players[0])
+ assertEquals(joiner.toDTO(), joinedLobby.players[1])
}
@Test
bgstack15