summaryrefslogtreecommitdiff
path: root/sw-server/src/test
diff options
context:
space:
mode:
authorJoffrey Bion <joffrey.bion@booking.com>2020-05-21 13:46:30 +0200
committerJoffrey Bion <joffrey.bion@booking.com>2020-05-21 13:58:28 +0200
commit4f3eec40a87c5e4f52fc89238642dd7a17650540 (patch)
treec910270b5477975100bfd82852d784409346f334 /sw-server/src/test
parentPrevent bots with already used names (diff)
downloadseven-wonders-4f3eec40a87c5e4f52fc89238642dd7a17650540.tar.gz
seven-wonders-4f3eec40a87c5e4f52fc89238642dd7a17650540.tar.bz2
seven-wonders-4f3eec40a87c5e4f52fc89238642dd7a17650540.zip
Allow custom player icons
Diffstat (limited to 'sw-server/src/test')
-rw-r--r--sw-server/src/test/kotlin/org/luxons/sevenwonders/server/controllers/HomeControllerTest.kt4
1 files changed, 3 insertions, 1 deletions
diff --git a/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/controllers/HomeControllerTest.kt b/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/controllers/HomeControllerTest.kt
index 31b957e4..d7206490 100644
--- a/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/controllers/HomeControllerTest.kt
+++ b/sw-server/src/test/kotlin/org/luxons/sevenwonders/server/controllers/HomeControllerTest.kt
@@ -2,6 +2,7 @@ package org.luxons.sevenwonders.server.controllers
import org.junit.Test
import org.luxons.sevenwonders.model.api.actions.ChooseNameAction
+import org.luxons.sevenwonders.model.api.actions.Icon
import org.luxons.sevenwonders.server.repositories.PlayerRepository
import kotlin.test.assertEquals
@@ -12,12 +13,13 @@ class HomeControllerTest {
val playerRepository = PlayerRepository()
val homeController = HomeController(playerRepository)
- val action = ChooseNameAction("Test User")
+ val action = ChooseNameAction("Test User", Icon("person"))
val principal = TestPrincipal("testuser")
val player = homeController.chooseName(action, principal)
assertEquals("testuser", player.username)
assertEquals("Test User", player.displayName)
+ assertEquals("person", player.icon?.name)
}
}
bgstack15