PLT-7212: fix missing webhook post attachments (#7011)
* fix missing webhook post attachments * make ProcessSlackAttachments return a new slice instead of modifying it
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
dc884983e6
Коммит
df1ff4ec97
@@ -10,8 +10,8 @@ func TestExpandAnnouncement(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestSlackAnnouncementProcess(t *testing.T) {
|
||||
attachments := SlackAttachments{
|
||||
func TestProcessSlackAnnouncement(t *testing.T) {
|
||||
attachments := []*SlackAttachment{
|
||||
{
|
||||
Pretext: "<!channel> pretext",
|
||||
Text: "<!channel> text",
|
||||
@@ -25,7 +25,7 @@ func TestSlackAnnouncementProcess(t *testing.T) {
|
||||
},
|
||||
}, nil,
|
||||
}
|
||||
attachments.Process()
|
||||
attachments = ProcessSlackAttachments(attachments)
|
||||
if len(attachments) != 1 || len(attachments[0].Fields) != 1 {
|
||||
t.Fail()
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user