FEATURE: Display emojis in user stream.

This commit is contained in:
Guo Xiang Tan
2015-07-23 23:02:03 +08:00
parent 410ae47dd7
commit 7c1e16da54
4 changed files with 14 additions and 3 deletions

View File

@@ -230,6 +230,11 @@ describe PrettyText do
expect(PrettyText.excerpt("'", 500, text_entities: true)).to eq("'")
end
it "should have an option to preserve emojis" do
emoji_image = "<img src='/images/emoji/emoji_one/heart.png?v=0' title=':heart:' class='emoji' alt='heart'>"
expect(PrettyText.excerpt(emoji_image, 100, { keep_emojis: true })).to match_html(emoji_image)
end
end
describe "strip links" do