MCPcopy
hub / github.com/larksuite/cli / TestDryRunAPI_MultipleCalls

Function TestDryRunAPI_MultipleCalls

internal/cmdutil/dryrun_test.go:95–107  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

93}
94
95func TestDryRunAPI_MultipleCalls(t *testing.T) {
96 dr := NewDryRunAPI().
97 GET("/open-apis/first").Desc("step 1").
98 POST("/open-apis/second").Desc("step 2")
99
100 text := dr.Format()
101 if !strings.Contains(text, "# step 1") || !strings.Contains(text, "# step 2") {
102 t.Errorf("expected both step descriptions, got: %s", text)
103 }
104 if !strings.Contains(text, "GET /open-apis/first") || !strings.Contains(text, "POST /open-apis/second") {
105 t.Errorf("expected both calls, got: %s", text)
106 }
107}
108
109func TestDryRunAPI_ExtraFieldsOnly(t *testing.T) {
110 dr := NewDryRunAPI().

Callers

nothing calls this directly

Calls 6

NewDryRunAPIFunction · 0.85
DescMethod · 0.80
POSTMethod · 0.80
GETMethod · 0.80
FormatMethod · 0.80
ContainsMethod · 0.45

Tested by

no test coverage detected