mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 20:11:59 -08:00
server: fixed broken games with banned players (regression)
This commit is contained in:
parent
6cd8649857
commit
f5c47686ac
2 changed files with 16 additions and 3 deletions
|
|
@ -2,11 +2,14 @@ package org.mage.test.serverside;
|
|||
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.view.GameView;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.mage.test.serverside.base.CardTestPlayerBase;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
|
|
@ -26,6 +29,16 @@ public class GameViewTest extends CardTestPlayerBase {
|
|||
UUID userB = UUID.randomUUID();
|
||||
UUID userWatcher = UUID.randomUUID();
|
||||
|
||||
// game copy test
|
||||
Assert.assertEquals(0, currentGame.getOptions().bannedUsers.size());
|
||||
Game copiedGame = currentGame.copy();
|
||||
Assert.assertEquals(0, copiedGame.getOptions().bannedUsers.size());
|
||||
//
|
||||
currentGame.getOptions().bannedUsers.add("123");
|
||||
Assert.assertEquals(1, currentGame.getOptions().bannedUsers.size());
|
||||
copiedGame = currentGame.copy();
|
||||
Assert.assertEquals(1, copiedGame.getOptions().bannedUsers.size());
|
||||
|
||||
// normal hand
|
||||
GameView gameView = getGameView(playerA, userA);
|
||||
Assert.assertNotNull(gameView);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue