diff options
Diffstat (limited to 'internal/game/act_state_test.go')
| -rw-r--r-- | internal/game/act_state_test.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/internal/game/act_state_test.go b/internal/game/act_state_test.go new file mode 100644 index 0000000..0ec139f --- /dev/null +++ b/internal/game/act_state_test.go @@ -0,0 +1,22 @@ +package game + +import ( + "testing" + + "thehouseoficarus/internal/player" +) + +func TestPlayerActionDisplayFightingInCombat(t *testing.T) { + g := escapeTestGame() + inst := spawnTestMob(g, "skeleton", 100) + p := player.New("combatant") + p.EscapeDir = "north" + + g.Combat.Enter(p.Name, inst.InstanceID) + + display := g.playerActionDisplay(p) + want := "fighting a " + inst.Name + if display != want { + t.Errorf("playerActionDisplay = %q, want %q", display, want) + } +} |
