diff options
author | ThibG <thib@sitedethib.com> | 2019-06-20 19:19:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-20 19:19:30 +0200 |
commit | f717d7a92da83703d270af50310fa3483b503417 (patch) | |
tree | e512bfc11eae35fa601522672f47261a0972c484 /spec | |
parent | f4b008906dcfc3333ec533884aa10b65f8ae41a2 (diff) | |
parent | 3771a993b7e19bc0e756e7f727f10ddd14c10c93 (diff) |
Merge pull request #1134 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/sanitize_config_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/lib/sanitize_config_spec.rb b/spec/lib/sanitize_config_spec.rb new file mode 100644 index 000000000..c5143bcef --- /dev/null +++ b/spec/lib/sanitize_config_spec.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +require 'rails_helper' +require Rails.root.join('app', 'lib', 'sanitize_config.rb') + +describe Sanitize::Config do + describe '::MASTODON_STRICT' do + subject { Sanitize::Config::MASTODON_STRICT } + + it 'keeps h1' do + expect(Sanitize.fragment('<h1>Foo</h1>', subject)).to eq '<h1>Foo</h1>' + end + + it 'keeps ul' do + expect(Sanitize.fragment('<p>Check out:</p><ul><li>Foo</li><li>Bar</li></ul>', subject)).to eq '<p>Check out:</p><ul><li>Foo</li><li>Bar</li></ul>' + end + end +end |