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

Function TestNewTrialCommandNoArgsErrorIncludesExample

pkg/cli/trial_command_test.go:30–46  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

28}
29
30func TestNewTrialCommandNoArgsErrorIncludesExample(t *testing.T) {
31 cmd := NewTrialCommand(func(string) error { return nil })
32 cmd.SetArgs(nil)
33
34 err := cmd.Execute()
35 if err == nil {
36 t.Fatal("expected an error when no workflow specification is provided")
37 }
38
39 if !strings.Contains(err.Error(), "missing workflow specification") {
40 t.Fatalf("expected missing workflow specification error, got: %s", err)
41 }
42
43 if !strings.Contains(err.Error(), "Example:") {
44 t.Fatalf("expected trial usage error to include an Example section, got: %s", err)
45 }
46}
47
48// Test the host repo slug processing logic with dot notation
49func TestHostRepoSlugProcessing(t *testing.T) {

Callers

nothing calls this directly

Calls 2

NewTrialCommandFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected