diff options
author | Sean McGivern <sean@gitlab.com> | 2017-04-27 13:02:27 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2017-04-27 13:02:27 +0300 |
commit | 2df748aa71d6c636c82ed2a0a8dde8ebf6bfc7f2 (patch) | |
tree | aae6ce8fac0775b15b65ce26afb3f700de030948 /spec/lib/banzai/filter | |
parent | 4bdbcf594812d35bab3c2b597fc8087f840bbd4d (diff) | |
parent | 31c990cc41e2dc7576cf867a313862a07fd8c170 (diff) |
Merge branch 'blackst0ne/gitlab-ce-fix_emoji_parser'
Diffstat (limited to 'spec/lib/banzai/filter')
-rw-r--r-- | spec/lib/banzai/filter/emoji_filter_spec.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/lib/banzai/filter/emoji_filter_spec.rb b/spec/lib/banzai/filter/emoji_filter_spec.rb index 707212e07fd..086a006c45f 100644 --- a/spec/lib/banzai/filter/emoji_filter_spec.rb +++ b/spec/lib/banzai/filter/emoji_filter_spec.rb @@ -68,9 +68,9 @@ describe Banzai::Filter::EmojiFilter, lib: true do expect(doc.css('gl-emoji').size).to eq 1 end - it 'matches multiple emoji in a row' do + it 'does not match multiple emoji in a row' do doc = filter(':see_no_evil::hear_no_evil::speak_no_evil:') - expect(doc.css('gl-emoji').size).to eq 3 + expect(doc.css('gl-emoji').size).to eq 0 end it 'unicode matches multiple emoji in a row' do @@ -83,6 +83,12 @@ describe Banzai::Filter::EmojiFilter, lib: true do expect(doc.css('gl-emoji').size).to eq 6 end + it 'does not match emoji in a string' do + doc = filter("'2a00:a4c0:100::1'") + + expect(doc.css('gl-emoji').size).to eq 0 + end + it 'has a data-name attribute' do doc = filter(':-1:') expect(doc.css('gl-emoji').first.attr('data-name')).to eq 'thumbsdown' |