2022-01-01 13:38:12 +00:00
|
|
|
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
|
2021-06-01 12:20:20 +00:00
|
|
|
|
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
|