From 4f3eec40a87c5e4f52fc89238642dd7a17650540 Mon Sep 17 00:00:00 2001 From: Joffrey Bion Date: Thu, 21 May 2020 13:46:30 +0200 Subject: Allow custom player icons --- .../org/luxons/sevenwonders/server/controllers/HomeControllerTest.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sw-server/src/test') 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) } } -- cgit