aboutsummaryrefslogtreecommitdiff
path: root/go/game/unit_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'go/game/unit_test.go')
-rw-r--r--go/game/unit_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/go/game/unit_test.go b/go/game/unit_test.go
index 94fd3893..26ef3700 100644
--- a/go/game/unit_test.go
+++ b/go/game/unit_test.go
@@ -129,3 +129,12 @@ symbols:
t.Fatal("6 attackable permanents expected not:", is)
}
}
+
+func TestKnightArmor(t *testing.T) {
+ a := NewUnit(NewCard("base/archer"), NewMockTile(), NewMockPlayer())
+ k := NewUnit(NewCard("base/knight"), NewMockTile(), NewMockPlayer())
+ DealDamage(a, k, a.Attack.DamageInRange(2))
+ if k.Damage() != 0 {
+ t.Fatal("knight received damage from attack 1")
+ }
+}