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

Function TestWriteAlertWarning

internal/output/emit_test.go:151–159  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

149}
150
151func TestWriteAlertWarning(t *testing.T) {
152 alert := &extcs.Alert{Provider: "regex", MatchedRules: []string{"r1", "r2"}}
153 var buf bytes.Buffer
154 WriteAlertWarning(&buf, alert)
155 got := buf.String()
156 if !strings.Contains(got, "r1") || !strings.Contains(got, "r2") {
157 t.Errorf("warning should contain rule IDs, got: %s", got)
158 }
159}

Callers

nothing calls this directly

Calls 3

WriteAlertWarningFunction · 0.85
StringMethod · 0.45
ContainsMethod · 0.45

Tested by

no test coverage detected