static_assets_spec.rb 480 B

123456789101112131415
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. RSpec.describe StaticAssets do
  4. describe '.data_url_attributes' do
  5. it 'raises error if empty string given' do
  6. expect { described_class.data_url_attributes('') }.to raise_error(%r{Unable to parse data url})
  7. end
  8. it 'raises error if nil' do
  9. expect { described_class.data_url_attributes(nil) }.to raise_error(%r{Unable to parse data url})
  10. end
  11. end
  12. end