2021-06-01 12:20:20 +00:00
|
|
|
# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
|
|
|
|
|
2021-04-30 13:36:23 +00:00
|
|
|
require 'rails_helper'
|
|
|
|
|
|
|
|
RSpec.describe StaticAssets do
|
|
|
|
describe '.data_url_attributes' do
|
|
|
|
it 'raises error if empty string given' do
|
2021-05-12 11:37:44 +00:00
|
|
|
expect { described_class.data_url_attributes('') }.to raise_error(%r{Unable to parse data url})
|
2021-04-30 13:36:23 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
it 'raises error if nil' do
|
2021-05-12 11:37:44 +00:00
|
|
|
expect { described_class.data_url_attributes(nil) }.to raise_error(%r{Unable to parse data url})
|
2021-04-30 13:36:23 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|