From ebd7d3ef156641870b4697fb67483f899b93e9fc Mon Sep 17 00:00:00 2001 From: Alex Vasile <48962821+Alex-Vasile@users.noreply.github.com> Date: Fri, 26 Aug 2022 20:16:29 -0400 Subject: [PATCH] Added extra test to explicitly test that it's not possible to target --- .../abilities/ProtectionFromColorTest.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Mage.Tests/src/test/java/org/mage/test/serverside/cards/abilities/ProtectionFromColorTest.java b/Mage.Tests/src/test/java/org/mage/test/serverside/cards/abilities/ProtectionFromColorTest.java index 04f56b64d9..f2339e7a2c 100644 --- a/Mage.Tests/src/test/java/org/mage/test/serverside/cards/abilities/ProtectionFromColorTest.java +++ b/Mage.Tests/src/test/java/org/mage/test/serverside/cards/abilities/ProtectionFromColorTest.java @@ -79,4 +79,27 @@ public class ProtectionFromColorTest extends CardTestPlayerBase { } + /** + * Test that the creature is also protected from targeting + */ + @Test + public void testProtectionTargeting() { + // {3}{W} + // Protection from white + String archonOfAbsolution = "Archon of Absolution"; + // {W} + // Exile target creature + String pathToExile = "Path to Exile"; + + addCard(Zone.BATTLEFIELD, playerA, archonOfAbsolution); + + addCard(Zone.HAND, playerB, pathToExile); + addCard(Zone.BATTLEFIELD, playerB, "Plains"); + + checkPlayableAbility("Protection works", 1, PhaseStep.PRECOMBAT_MAIN, playerB, "Cast " + pathToExile, false); + + execute(); + + assertPermanentCount(playerA, archonOfAbsolution, 1); + } }