闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
413 B

  1. require 'rails_helper'
  2. RSpec.describe EmojiHelper, type: :helper do
  3. describe '#emojify' do
  4. it 'converts shortcodes to unicode' do
  5. text = ':book: Book'
  6. expect(emojify(text)).to eq '📖 Book'
  7. end
  8. it 'does not convert shortcodes that are part of a string into unicode' do
  9. text = ':see_no_evil::hear_no_evil::speak_no_evil:'
  10. expect(emojify(text)).to eq text
  11. end
  12. end
  13. end