From a80ad2b4691d0df63f68c6977ee18444e7bb752f Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 18 Jun 2026 08:05:32 +0300 Subject: ik0 replace remaining test seams with DI --- internal/hexaiaction/tui_custom_test.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'internal/hexaiaction/tui_custom_test.go') diff --git a/internal/hexaiaction/tui_custom_test.go b/internal/hexaiaction/tui_custom_test.go index 7f7e2d3..62d37cb 100644 --- a/internal/hexaiaction/tui_custom_test.go +++ b/internal/hexaiaction/tui_custom_test.go @@ -71,3 +71,20 @@ func TestRunTUIWithCustom_SubmenuAndHotkeys(t *testing.T) { t.Fatalf("expected selected custom a, got %+v", selected) } } + +func TestRunTUIWithCustom_EmptyCustomsUsesRunner(t *testing.T) { + r := tuiRunner{newProgram: func(m model) teaProgram { + return fakeProg{m: m, onRun: func(mm *model) { mm.chosen = ActionDocument }} + }} + + kind, selected, err := r.RunTUIWithCustom(nil, "") + if err != nil { + t.Fatalf("RunTUIWithCustom error: %v", err) + } + if kind != ActionDocument { + t.Fatalf("kind = %s, want %s", kind, ActionDocument) + } + if selected != nil { + t.Fatalf("selected = %+v, want nil", selected) + } +} -- cgit v1.2.3