FIX: Don't onebox @mentions

This commit is contained in:
Robin Ward
2013-08-24 15:00:18 -04:00
parent 1ef9354e21
commit 20e8a8a38a
3 changed files with 12 additions and 2 deletions

View File

@ -116,7 +116,10 @@ test("Quotes", function() {
});
test("Mentions", function() {
cookedOptions("Hello @sam", { mentionLookup: (function() { return true; }) },
var alwaysTrue = { mentionLookup: (function() { return true; }) };
cookedOptions("Hello @sam", alwaysTrue,
"<p>Hello <a class=\"mention\" href=\"/users/sam\">@sam</a></p>",
"translates mentions to links");
@ -162,6 +165,10 @@ test("Mentions", function() {
"<ol><li><p>this is a list</p></li><li><p>this is an <span class=\"mention\">@eviltrout</span> mention </p></li></ol>",
"it mentions properly in a list.");
cookedOptions("@eviltrout", alwaysTrue,
"<p><a class=\"mention\" href=\"/users/eviltrout\">@eviltrout</a></p>",
"it doesn't onebox mentions");
});
test("Oneboxing", function() {