summaryrefslogtreecommitdiffstats
path: root/app/notification_test.go
diff options
context:
space:
mode:
authorStephen Kiers <stephen@stephenkiers.com>2018-02-12 16:30:03 -0700
committerStephen Kiers <stephen@stephenkiers.com>2018-02-12 16:30:03 -0700
commit0cbba46018d3879234d3940e8ee6f23dd99a1c5a (patch)
tree2ca3ba9baffb55256e860af508f03769ab34ccea /app/notification_test.go
parent32c1f7be239ddb19d6c59b114d9ae1a543f8ba9c (diff)
downloadchat-0cbba46018d3879234d3940e8ee6f23dd99a1c5a.tar.gz
chat-0cbba46018d3879234d3940e8ee6f23dd99a1c5a.tar.bz2
chat-0cbba46018d3879234d3940e8ee6f23dd99a1c5a.zip
Fixes ICU-764
Diffstat (limited to 'app/notification_test.go')
-rw-r--r--app/notification_test.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/app/notification_test.go b/app/notification_test.go
index 11f4df685..7f2a63ab9 100644
--- a/app/notification_test.go
+++ b/app/notification_test.go
@@ -109,6 +109,15 @@ func TestGetExplicitMentions(t *testing.T) {
},
},
},
+ "OnePersonAtEndOfSentence": {
+ Message: "this is a message for @user.",
+ Keywords: map[string][]string{"@user": {id1}},
+ Expected: &ExplicitMentions{
+ MentionedUserIds: map[string]bool{
+ id1: true,
+ },
+ },
+ },
"OnePersonWithoutAtMention": {
Message: "this is a message for @user",
Keywords: map[string][]string{"this": {id1}},
@@ -179,6 +188,15 @@ func TestGetExplicitMentions(t *testing.T) {
},
},
},
+ "UserWithPeriodAtEndOfSentence": {
+ Message: "this is a message for user.period.",
+ Keywords: map[string][]string{"user.period": {id1}},
+ Expected: &ExplicitMentions{
+ MentionedUserIds: map[string]bool{
+ id1: true,
+ },
+ },
+ },
"PotentialOutOfChannelUser": {
Message: "this is an message for @potential and @user",
Keywords: map[string][]string{"@user": {id1}},