Commit f6bc4403 authored by Robert Speicher's avatar Robert Speicher

Make the "customizes the whitelist only once" spec less brittle

parent c3bda6c3
Pipeline #12044762 passed with stages
in 84 minutes and 13 seconds
...@@ -47,9 +47,11 @@ describe Banzai::Filter::SanitizationFilter do ...@@ -47,9 +47,11 @@ describe Banzai::Filter::SanitizationFilter do
describe 'custom whitelist' do describe 'custom whitelist' do
it 'customizes the whitelist only once' do it 'customizes the whitelist only once' do
instance = described_class.new('Foo') instance = described_class.new('Foo')
control_count = instance.whitelist[:transformers].size
3.times { instance.whitelist } 3.times { instance.whitelist }
expect(instance.whitelist[:transformers].size).to eq 5 expect(instance.whitelist[:transformers].size).to eq control_count
end end
it 'sanitizes `class` attribute from all elements' do it 'sanitizes `class` attribute from all elements' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment