MCPcopy Index your code
hub / github.com/jetify-com/devbox / TestTaskConfirmPromptAllow

Function TestTaskConfirmPromptAllow

internal/setup/setup_test.go:100–113  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

98}
99
100func TestTaskConfirmPromptAllow(t *testing.T) {
101 tempXDGStateDir(t)
102
103 task := &testTask{
104 RunFunc: func(ctx context.Context) error { return nil },
105 NeedsRunFunc: func(context.Context, RunInfo) bool { return true },
106 }
107
108 setPromptResponse(t, true)
109 err := ConfirmRun(t.Context(), t.Name(), task, "continue?")
110 if err != nil {
111 t.Error("got non-nil error:", err)
112 }
113}
114
115func TestTaskConfirmPromptDeny(t *testing.T) {
116 tempXDGStateDir(t)

Callers

nothing calls this directly

Calls 4

tempXDGStateDirFunction · 0.85
setPromptResponseFunction · 0.85
ConfirmRunFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected