static_assets_spec.rb 399 B

12345678910111213
  1. require 'rails_helper'
  2. RSpec.describe StaticAssets do
  3. describe '.data_url_attributes' do
  4. it 'raises error if empty string given' do
  5. expect { described_class.data_url_attributes('') }.to raise_error(/Unable to parse data url/)
  6. end
  7. it 'raises error if nil' do
  8. expect { described_class.data_url_attributes(nil) }.to raise_error(/Unable to parse data url/)
  9. end
  10. end
  11. end