trabajo-afectivo/spec/lib/static_assets_spec.rb

14 lines
403 B
Ruby
Raw Normal View History

require 'rails_helper'
RSpec.describe StaticAssets do
describe '.data_url_attributes' do
it 'raises error if empty string given' do
expect { described_class.data_url_attributes('') }.to raise_error(%r{Unable to parse data url})
end
it 'raises error if nil' do
expect { described_class.data_url_attributes(nil) }.to raise_error(%r{Unable to parse data url})
end
end
end