(t *testing.T)
| 119 | } |
| 120 | |
| 121 | func 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 | |
| 136 | func TestBuildMessage_JSONStructure(t *testing.T) { |
| 137 | a := require.New(t) |
nothing calls this directly
no test coverage detected