summaryrefslogtreecommitdiff
path: root/internal/hexaiaction/custom_exec_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_test.go
parent5f8e008fc2e5a9abb8bc2c8cfe66ec49cce3a19d (diff)
hexaiaction: replace global action state with Runner struct (task 406)
Diffstat (limited to 'internal/hexaiaction/custom_exec_test.go')
-rw-r--r--internal/hexaiaction/custom_exec_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/hexaiaction/custom_exec_test.go b/internal/hexaiaction/custom_exec_test.go
index 4b7b09d..24f549e 100644
--- a/internal/hexaiaction/custom_exec_test.go
+++ b/internal/hexaiaction/custom_exec_test.go
@@ -11,8 +11,8 @@ import (
func TestExecuteAction_CustomConfigured_Instruction(t *testing.T) {
cfg := appconfig.Load(nil)
parts := InputParts{Selection: "code"}
- selectedCustom = &appconfig.CustomAction{ID: "x", Title: "X", Instruction: "Do it"}
- out, err := executeAction(context.Background(), ActionCustom, parts, cfg, fakeDoer{"OK"}, nil)
+ selectedCustom := &appconfig.CustomAction{ID: "x", Title: "X", Instruction: "Do it"}
+ out, err := executeAction(context.Background(), ActionCustom, parts, cfg, fakeDoer{"OK"}, nil, selectedCustom)
if err != nil || strings.TrimSpace(out) != "OK" {
t.Fatalf("custom-instruction failed: %q %v", out, err)
}
@@ -21,8 +21,8 @@ func TestExecuteAction_CustomConfigured_Instruction(t *testing.T) {
func TestExecuteAction_CustomConfigured_User(t *testing.T) {
cfg := appconfig.Load(nil)
parts := InputParts{Selection: "sel"}
- selectedCustom = &appconfig.CustomAction{ID: "y", Title: "Y", User: "Apply to: {{selection}}"}
- out, err := executeAction(context.Background(), ActionCustom, parts, cfg, fakeDoer{"OK2"}, nil)
+ selectedCustom := &appconfig.CustomAction{ID: "y", Title: "Y", User: "Apply to: {{selection}}"}
+ out, err := executeAction(context.Background(), ActionCustom, parts, cfg, fakeDoer{"OK2"}, nil, selectedCustom)
if err != nil || strings.TrimSpace(out) != "OK2" {
t.Fatalf("custom-user failed: %q %v", out, err)
}