From 3836f9992056410e00041004132f5d53b4e43300 Mon Sep 17 00:00:00 2001 From: Joey Lee Date: Sat, 18 Nov 2017 03:17:59 +1100 Subject: PLT-7824 Added support for mentions with <@userid> and (#7615) (#7737) --- model/slack_attachment_test.go | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 model/slack_attachment_test.go (limited to 'model/slack_attachment_test.go') diff --git a/model/slack_attachment_test.go b/model/slack_attachment_test.go deleted file mode 100644 index 2ba32baf2..000000000 --- a/model/slack_attachment_test.go +++ /dev/null @@ -1,38 +0,0 @@ -package model - -import ( - "testing" -) - -func TestExpandAnnouncement(t *testing.T) { - if ExpandAnnouncement(" foo ") != "@channel foo @channel" { - t.Fail() - } -} - -func TestProcessSlackAnnouncement(t *testing.T) { - attachments := []*SlackAttachment{ - { - Pretext: " pretext", - Text: " text", - Title: " title", - Fields: []*SlackAttachmentField{ - { - Title: "foo", - Value: " bar", - Short: true, - }, nil, - }, - }, nil, - } - attachments = ProcessSlackAttachments(attachments) - if len(attachments) != 1 || len(attachments[0].Fields) != 1 { - t.Fail() - } - if attachments[0].Pretext != "@channel pretext" || - attachments[0].Text != "@channel text" || - attachments[0].Title != "@channel title" || - attachments[0].Fields[0].Value != "@channel bar" { - t.Fail() - } -} -- cgit v1.2.3-1-g7c22