summaryrefslogtreecommitdiffstats
path: root/webapp/tests/utils/formatting_at_mentions.test.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/tests/utils/formatting_at_mentions.test.jsx')
-rw-r--r--webapp/tests/utils/formatting_at_mentions.test.jsx30
1 files changed, 19 insertions, 11 deletions
diff --git a/webapp/tests/utils/formatting_at_mentions.test.jsx b/webapp/tests/utils/formatting_at_mentions.test.jsx
index d64b42c3f..51f9bef65 100644
--- a/webapp/tests/utils/formatting_at_mentions.test.jsx
+++ b/webapp/tests/utils/formatting_at_mentions.test.jsx
@@ -50,30 +50,38 @@ describe('TextFormatting.AtMentions', function() {
);
});
- it('Implied at mentions', function() {
- // PLT-4454 Assume users exist for things that look like at mentions until we support the new mention syntax
+ it('Not at mentions', function() {
+ assert.equal(
+ TextFormatting.autolinkAtMentions('user@host', new Map(), {user: {}, host: {}}),
+ 'user@host'
+ );
+
+ assert.equal(
+ TextFormatting.autolinkAtMentions('user@email.com', new Map(), {user: {}, email: {}}),
+ 'user@email.com'
+ );
+
assert.equal(
TextFormatting.autolinkAtMentions('@user', new Map(), {}),
- '$MM_ATMENTION0',
- 'should imply user exists and replace mention with token'
+ '@user'
);
assert.equal(
TextFormatting.autolinkAtMentions('@user.', new Map(), {}),
- '$MM_ATMENTION0.',
+ '@user.',
'should assume username doesn\'t end in punctuation'
);
- });
- it('Not at mentions', function() {
assert.equal(
- TextFormatting.autolinkAtMentions('user@host', new Map(), {user: {}, host: {}}),
- 'user@host'
+ TextFormatting.autolinkAtMentions('@will', new Map(), {william: {}}),
+ '@will',
+ 'should return same text without token'
);
assert.equal(
- TextFormatting.autolinkAtMentions('user@email.com', new Map(), {user: {}, email: {}}),
- 'user@email.com'
+ TextFormatting.autolinkAtMentions('@william', new Map(), {will: {}}),
+ '@william',
+ 'should return same text without token'
);
});
});