cleanup_spec.rb 369 B

1234567891011121314
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. RSpec.describe HtmlSanitizer::Cleanup do
  4. describe('#sanitize') do
  5. it 'cleans up string' do
  6. input = '<a:z></a:z><div>asd<b><i></i></b></div>'
  7. target = '<div>asd</div>'
  8. expect(described_class.new.sanitize(input)).to eq target
  9. end
  10. end
  11. end