diff options
author | Joffrey Bion <joffrey.bion@booking.com> | 2020-05-21 13:46:30 +0200 |
---|---|---|
committer | Joffrey Bion <joffrey.bion@booking.com> | 2020-05-21 13:58:28 +0200 |
commit | 4f3eec40a87c5e4f52fc89238642dd7a17650540 (patch) | |
tree | c910270b5477975100bfd82852d784409346f334 /sw-server/src/test/kotlin/org/luxons | |
parent | Prevent bots with already used names (diff) | |
download | seven-wonders-4f3eec40a87c5e4f52fc89238642dd7a17650540.tar.gz seven-wonders-4f3eec40a87c5e4f52fc89238642dd7a17650540.tar.bz2 seven-wonders-4f3eec40a87c5e4f52fc89238642dd7a17650540.zip |
Allow custom player icons
Diffstat (limited to 'sw-server/src/test/kotlin/org/luxons')
-rw-r--r-- | sw-server/src/test/kotlin/org/luxons/sevenwonders/server/controllers/HomeControllerTest.kt | 4 |
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) } } |