FIX: slightly improve emoji support in titles (no need for spaces between emojis)

This commit is contained in:
Régis Hanol
2015-06-16 10:15:42 +02:00
parent f26eee8431
commit 01a23203c7
2 changed files with 5 additions and 3 deletions

View File

@ -73,6 +73,8 @@ test("recover", function() {
});
test('fancyTitle', function() {
var topic = Topic.create({ fancy_title: ":smile: with all the emojis" });
equal(topic.get('fancyTitle'), "<img src='/images/emoji/undefined/smile.png?v=0' title='smile' alt='smile' class='emoji'> with all the emojis", "supports emojis");
var topic = Topic.create({ fancy_title: ":smile: with all :) the emojis :pear::peach:" });
equal(topic.get('fancyTitle'),
"<img src='/images/emoji/undefined/smile.png?v=0' title='smile' alt='smile' class='emoji'> with all <img src='/images/emoji/undefined/smile.png?v=0' title='smile' alt='smile' class='emoji'> the emojis <img src='/images/emoji/undefined/pear.png?v=0' title='pear' alt='pear' class='emoji'><img src='/images/emoji/undefined/peach.png?v=0' title='peach' alt='peach' class='emoji'>",
"supports emojis");
});