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

Function TestDryRunAPI_SingleGET

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

Source from the content-addressed store, hash-verified

14)
15
16func TestDryRunAPI_SingleGET(t *testing.T) {
17 dr := NewDryRunAPI().
18 Desc("list calendars").
19 GET("/open-apis/calendar/v4/calendars")
20
21 text := dr.Format()
22 if !strings.Contains(text, "# list calendars") {
23 t.Errorf("expected description in text output, got: %s", text)
24 }
25 if !strings.Contains(text, "GET /open-apis/calendar/v4/calendars") {
26 t.Errorf("expected GET line in text output, got: %s", text)
27 }
28}
29
30func TestDryRunAPI_WithParams(t *testing.T) {
31 dr := NewDryRunAPI().

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected