MCPcopy Create free account
hub / github.com/github/gh-aw / TestPromptForConfigurationFrom_ByValue

Function TestPromptForConfigurationFrom_ByValue

pkg/cli/interactive_test.go:942–959  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

940}
941
942func TestPromptForConfigurationFrom_ByValue(t *testing.T) {
943 // Use values instead of numbers for engine and tools
944 input := "issues\nclaude\ngithub,bash\ncreate-issue\ndefaults\nThis is a test workflow that does something useful and important\n"
945 b := &InteractiveWorkflowBuilder{}
946 err := b.promptForConfigurationFrom(strings.NewReader(input))
947 if err != nil {
948 t.Fatalf("unexpected error: %v", err)
949 }
950 if b.Trigger != "issues" {
951 t.Errorf("Trigger = %q, want issues", b.Trigger)
952 }
953 if b.Engine != "claude" {
954 t.Errorf("Engine = %q, want claude", b.Engine)
955 }
956 if len(b.Tools) != 2 || b.Tools[0] != "github" || b.Tools[1] != "bash" {
957 t.Errorf("Tools = %v, want [github bash]", b.Tools)
958 }
959}
960
961func TestPromptForWorkflowNameFrom_ThenConfigurationFrom_SharedReader(t *testing.T) {
962 input := strings.NewReader(

Callers

nothing calls this directly

Calls 2

ErrorfMethod · 0.45

Tested by

no test coverage detected