dynamic_image_size_spec.rb 398 B

1234567891011121314
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. RSpec.describe HtmlSanitizer::DynamicImageSize do
  4. describe('#sanitize') do
  5. subject(:sanitized) { described_class.new.sanitize(input) }
  6. let(:input) { '<img src="...">' }
  7. let(:target) { '<img src="..." style="max-width:100%;">' }
  8. it { expect(sanitized).to eq target }
  9. end
  10. end