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

Function TestDryRunAPI_ResolveURL

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

Source from the content-addressed store, hash-verified

53}
54
55func TestDryRunAPI_ResolveURL(t *testing.T) {
56 dr := NewDryRunAPI().
57 GET("/open-apis/calendar/v4/calendars/:calendar_id/events").
58 Set("calendar_id", "cal_abc123")
59
60 text := dr.Format()
61 if !strings.Contains(text, "cal_abc123") {
62 t.Errorf("expected resolved calendar_id in URL, got: %s", text)
63 }
64 if strings.Contains(text, ":calendar_id") {
65 t.Errorf("expected placeholder to be resolved, got: %s", text)
66 }
67}
68
69func TestDryRunAPI_MarshalJSON(t *testing.T) {
70 dr := NewDryRunAPI().

Callers

nothing calls this directly

Calls 5

NewDryRunAPIFunction · 0.85
GETMethod · 0.80
FormatMethod · 0.80
SetMethod · 0.65
ContainsMethod · 0.45

Tested by

no test coverage detected