diff options
Diffstat (limited to 'app/notification_test.go')
-rw-r--r-- | app/notification_test.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/app/notification_test.go b/app/notification_test.go index 1abdd3d61..8df19e2bf 100644 --- a/app/notification_test.go +++ b/app/notification_test.go @@ -186,6 +186,17 @@ func TestGetExplicitMentions(t *testing.T) { ChannelMentioned: true, }, }, + "CapitalizedChannel": { + Message: "this is an message for @cHaNNeL", + Keywords: map[string][]string{"@channel": {id1, id2}}, + Expected: &ExplicitMentions{ + MentionedUserIds: map[string]bool{ + id1: true, + id2: true, + }, + ChannelMentioned: true, + }, + }, "All": { Message: "this is an message for @all", Keywords: map[string][]string{"@all": {id1, id2}}, @@ -197,6 +208,17 @@ func TestGetExplicitMentions(t *testing.T) { AllMentioned: true, }, }, + "CapitalizedAll": { + Message: "this is an message for @ALL", + Keywords: map[string][]string{"@all": {id1, id2}}, + Expected: &ExplicitMentions{ + MentionedUserIds: map[string]bool{ + id1: true, + id2: true, + }, + AllMentioned: true, + }, + }, "UserWithPeriod": { Message: "user.period doesn't complicate things at all by including periods in their username", Keywords: map[string][]string{"user.period": {id1}, "user": {id2}}, @@ -439,6 +461,8 @@ func TestGetExplicitMentionsAtHere(t *testing.T) { "?@here?": true, "`@here`": false, // This case shouldn't mention since it's a code block "~@here~": true, + "@HERE": true, + "@hERe": true, } for message, shouldMention := range cases { |