summaryrefslogtreecommitdiff
path: root/internal/hexaiaction/custom_exec_more_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-02 14:54:08 +0200
committerPaul Buetow <paul@buetow.org>2026-03-02 14:54:08 +0200
commitf80462176d1ad0daf20b05d6410074369148c245 (patch)
tree5cbe412797c923a881333bd89d59d238be646ad7 /internal/hexaiaction/custom_exec_more_test.go
parent5f8e008fc2e5a9abb8bc2c8cfe66ec49cce3a19d (diff)
hexaiaction: replace global action state with Runner struct (task 406)
Diffstat (limited to 'internal/hexaiaction/custom_exec_more_test.go')
-rw-r--r--internal/hexaiaction/custom_exec_more_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/hexaiaction/custom_exec_more_test.go b/internal/hexaiaction/custom_exec_more_test.go
index de45d26..28bbb97 100644
--- a/internal/hexaiaction/custom_exec_more_test.go
+++ b/internal/hexaiaction/custom_exec_more_test.go
@@ -18,13 +18,13 @@ func (c *capDoer) Chat(_ context.Context, msgs []llm.Message, _ ...llm.RequestOp
}
func (*capDoer) DefaultModel() string { return "m" }
-func TestExecuteAction_Custom_ClearsSelection(t *testing.T) {
+func TestExecuteAction_Custom_DoesNotMutateProvidedSelection(t *testing.T) {
cfg := appconfig.Load(nil)
parts := InputParts{Selection: "code"}
- selectedCustom = &appconfig.CustomAction{ID: "x", Title: "X", Instruction: "Do it"}
- _, _ = executeAction(context.Background(), ActionCustom, parts, cfg, fakeDoer{"OK"}, nil)
- if selectedCustom != nil {
- t.Fatalf("expected selectedCustom cleared after execution")
+ selectedCustom := &appconfig.CustomAction{ID: "x", Title: "X", Instruction: "Do it"}
+ _, _ = executeAction(context.Background(), ActionCustom, parts, cfg, fakeDoer{"OK"}, nil, selectedCustom)
+ if selectedCustom == nil {
+ t.Fatalf("expected provided selectedCustom to remain local state")
}
}