From ec703a39738fefb60817f5659f76f8e683f8d301 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Mon, 5 Oct 2026 17:39:06 -0400 Subject: fix: admin undo/redo failure, video poker cabinet ids, room ref behavior --- internal/validate/correct_audit_fixes_test.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'internal/validate/correct_audit_fixes_test.go') diff --git a/internal/validate/correct_audit_fixes_test.go b/internal/validate/correct_audit_fixes_test.go index 8ed6f52..f11dd3f 100644 --- a/internal/validate/correct_audit_fixes_test.go +++ b/internal/validate/correct_audit_fixes_test.go @@ -31,3 +31,19 @@ func TestValidateTalkConfigRequiresStartNode(t *testing.T) { } } } + +// Regression: a gather drop with weight <= 0 can never be selected (the +// weighted roll has zero total); it must be flagged. +func TestValidateGatherWarnsOnWeightlessDrop(t *testing.T) { + cfg := &behavior.GatherConfig{Drops: []behavior.DropEntry{{ItemID: "ore", Weight: 0}}} + issues := validateGather("test", cfg, map[string]bool{"ore": true}, map[string]bool{}) + found := false + for _, iss := range issues { + if strings.Contains(iss.Message, "weight") { + found = true + } + } + if !found { + t.Fatalf("weightless drop not warned: %+v", issues) + } +} -- cgit v1.2.3