Sha256: 7f0e90a78b1ef7436c0c96ea0cc1537209f76857e48e981c056e284e12b523e8

Contents?: true

Size: 757 Bytes

Versions: 13

Compression:

Stored size: 757 Bytes

Contents

require 'spec_helper'

module HTML
  class Pipeline
    describe RevealCKEmojiFilter do
      let :emoji_filter do
        doc = nil
        context = {
          asset_root: 'asset_root'
        }
        RevealCKEmojiFilter.new doc, context
      end

      it 'works with defined emoji' do
        expected = "I <img class='emoji' "
        expected += "alt=':heart:' src='asset_root/emoji/unicode/2764.png' "
        expected += '/> emoji'
        result = emoji_filter.emoji_image_filter('I :heart: emoji')
        expect(result).to eq(expected)
      end

      it 'leaves undefined emoji alone' do
        result = emoji_filter.emoji_image_filter('I :dont_know: emoji')
        expect(result).to eq('I :dont_know: emoji')
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
reveal-ck-4.0.0 spec/lib/html/pipeline/reveal_ck_emoji_filter_spec.rb
reveal-ck-3.9.2 spec/lib/html/pipeline/reveal_ck_emoji_filter_spec.rb
reveal-ck-3.9.1 spec/lib/html/pipeline/reveal_ck_emoji_filter_spec.rb
reveal-ck-3.9.0 spec/lib/html/pipeline/reveal_ck_emoji_filter_spec.rb
reveal-ck-3.8.1 spec/lib/html/pipeline/reveal_ck_emoji_filter_spec.rb
reveal-ck-3.8.0 spec/lib/html/pipeline/reveal_ck_emoji_filter_spec.rb
reveal-ck-3.7.0 spec/lib/html/pipeline/reveal_ck_emoji_filter_spec.rb
reveal-ck-3.6.0 spec/lib/html/pipeline/reveal_ck_emoji_filter_spec.rb
reveal-ck-3.5.1 spec/lib/html/pipeline/reveal_ck_emoji_filter_spec.rb
reveal-ck-3.5.0 spec/lib/html/pipeline/reveal_ck_emoji_filter_spec.rb
reveal-ck-3.4.0 spec/lib/html/pipeline/reveal_ck_emoji_filter_spec.rb
reveal-ck-3.3.1 spec/lib/html/pipeline/reveal_ck_emoji_filter_spec.rb
reveal-ck-3.3.0 spec/lib/html/pipeline/reveal_ck_emoji_filter_spec.rb