]> cat aescling's git repositories - mastodon.git/blob - spec/helpers/emoji_helper_spec.rb
Add custom emojis to the emoji picker (#5052)
[mastodon.git] / spec / helpers / emoji_helper_spec.rb
1 require 'rails_helper'
2
3 RSpec.describe EmojiHelper, type: :helper do
4 describe '#emojify' do
5 it 'converts shortcodes to unicode' do
6 text = ':book: Book'
7 expect(emojify(text)).to eq '📖 Book'
8 end
9
10 it 'converts composite emoji shortcodes to unicode' do
11 text = ':couple_ww:'
12 expect(emojify(text)).to eq '👩❤👩'
13 end
14
15 it 'does not convert shortcodes that are part of a string into unicode' do
16 text = ':see_no_evil::hear_no_evil::speak_no_evil:'
17 expect(emojify(text)).to eq text
18 end
19 end
20 end
This page took 0.131575 seconds and 6 git commands to generate.