From 57a6e5135ee554079c6064bd770d51545800969d Mon Sep 17 00:00:00 2001 From: Joffrey Bion Date: Sun, 29 Mar 2020 18:02:47 +0200 Subject: Fix duplicated inconsistent state --- .../sevenwonders/server/controllers/GameBrowserControllerTest.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sw-server/src/test/kotlin') 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 -- cgit