summaryrefslogtreecommitdiffstats
path: root/app/notification_test.go
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2017-04-28 10:13:07 -0400
committerChristopher Speller <crspeller@gmail.com>2017-04-28 10:13:07 -0400
commitc3e17da8c8ebd101d43ea9185821c44b651535b1 (patch)
tree48888cd816faa1beb6c822cc60c095bc6e6b232c /app/notification_test.go
parent83bfd95f65f5e74402f7146feecb68b37dd0bf84 (diff)
downloadchat-c3e17da8c8ebd101d43ea9185821c44b651535b1.tar.gz
chat-c3e17da8c8ebd101d43ea9185821c44b651535b1.tar.bz2
chat-c3e17da8c8ebd101d43ea9185821c44b651535b1.zip
PLT-6271 Changed word splitting to initially split on any non-name character (#6261)
* PLT-6271 Changed word splitting to initially split on any non-name character * Fixed detection of out of channel mentions
Diffstat (limited to 'app/notification_test.go')
-rw-r--r--app/notification_test.go52
1 files changed, 25 insertions, 27 deletions
diff --git a/app/notification_test.go b/app/notification_test.go
index 1d5c82405..e59ba35d8 100644
--- a/app/notification_test.go
+++ b/app/notification_test.go
@@ -168,40 +168,38 @@ func TestGetExplicitMentionsAtHere(t *testing.T) {
"here": false,
"@here": true,
" @here ": true,
- "\t@here\t": true,
"\n@here\n": true,
- // "!@here!": true,
- // "@@here@": true,
- // "#@here#": true,
- // "$@here$": true,
- // "%@here%": true,
- // "^@here^": true,
- // "&@here&": true,
- // "*@here*": true,
- "(@here(": true,
- ")@here)": true,
- // "-@here-": true,
- // "_@here_": true,
- // "=@here=": true,
+ "!@here!": true,
+ "#@here#": true,
+ "$@here$": true,
+ "%@here%": true,
+ "^@here^": true,
+ "&@here&": true,
+ "*@here*": true,
+ "(@here(": true,
+ ")@here)": true,
+ "-@here-": true,
+ "_@here_": false, // This case shouldn't mention since it would be mentioning "@here_"
+ "=@here=": true,
"+@here+": true,
"[@here[": true,
"{@here{": true,
"]@here]": true,
"}@here}": true,
"\\@here\\": true,
- // "|@here|": true,
- ";@here;": true,
- ":@here:": true,
- // "'@here'": true,
- // "\"@here\"": true,
- ",@here,": true,
- "<@here<": true,
- ".@here.": true,
- ">@here>": true,
- "/@here/": true,
- "?@here?": true,
- // "`@here`": true,
- // "~@here~": true,
+ "|@here|": true,
+ ";@here;": true,
+ ":@here:": true,
+ "'@here'": true,
+ "\"@here\"": true,
+ ",@here,": true,
+ "<@here<": true,
+ ".@here.": true,
+ ">@here>": true,
+ "/@here/": true,
+ "?@here?": true,
+ "`@here`": false, // This case shouldn't mention since it's a code block
+ "~@here~": true,
}
for message, shouldMention := range cases {