diff options
author | Joey Lee <jayd005@gmail.com> | 2017-11-18 03:17:59 +1100 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2017-11-17 11:17:59 -0500 |
commit | 3836f9992056410e00041004132f5d53b4e43300 (patch) | |
tree | a75570472e9000c7cde74454af7fa186dcab2062 /model/slack_attachment_test.go | |
parent | 065d8e97313b9c8ffad37862665186668c88499f (diff) | |
download | chat-3836f9992056410e00041004132f5d53b4e43300.tar.gz chat-3836f9992056410e00041004132f5d53b4e43300.tar.bz2 chat-3836f9992056410e00041004132f5d53b4e43300.zip |
PLT-7824 Added support for mentions with <@userid> and <!here> (#7615) (#7737)
Diffstat (limited to 'model/slack_attachment_test.go')
-rw-r--r-- | model/slack_attachment_test.go | 38 |
1 files changed, 0 insertions, 38 deletions
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("<!channel> foo <!channel>") != "@channel foo @channel" { - t.Fail() - } -} - -func TestProcessSlackAnnouncement(t *testing.T) { - attachments := []*SlackAttachment{ - { - Pretext: "<!channel> pretext", - Text: "<!channel> text", - Title: "<!channel> title", - Fields: []*SlackAttachmentField{ - { - Title: "foo", - Value: "<!channel> 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() - } -} |