MCPcopy Create free account
hub / github.com/bytebase/bytebase / TestBuildMessage_Warn

Function TestBuildMessage_Warn

backend/plugin/webhook/slack/slack_test.go:121–134  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

119}
120
121func TestBuildMessage_Warn(t *testing.T) {
122 a := require.New(t)
123
124 ctx := webhook.Context{
125 Level: webhook.WebhookWarn,
126 Title: "Issue sent back",
127 Link: "https://bb.example.com/projects/proj-1/issues/1",
128 }
129
130 msg := BuildMessage(ctx)
131
132 a.Equal("#ECB22E", msg.Attachments[0].Color)
133 a.Contains(msg.Attachments[0].BlockList[0].Text.Text, "⚠️")
134}
135
136func TestBuildMessage_JSONStructure(t *testing.T) {
137 a := require.New(t)

Callers

nothing calls this directly

Calls 2

BuildMessageFunction · 0.70
EqualMethod · 0.65

Tested by

no test coverage detected