2016-11-25 16:10:37 +00:00
|
|
|
require 'rails_helper'
|
2017-03-27 09:25:45 +00:00
|
|
|
require 'lib/import/otrs/dynamic_field_examples'
|
2016-11-25 16:10:37 +00:00
|
|
|
|
|
|
|
RSpec.describe Import::OTRS::DynamicField do
|
|
|
|
it_behaves_like 'Import::OTRS::DynamicField'
|
|
|
|
|
|
|
|
let(:start_import_test) { described_class.new(object_structure) }
|
|
|
|
let(:object_structure) { load_dynamic_field_json('text/default') }
|
|
|
|
|
|
|
|
it 'requires an implementation of init_callback' do
|
|
|
|
expect(ObjectManager::Attribute).to receive(:get).and_return(false)
|
2017-10-01 12:25:52 +00:00
|
|
|
expect do
|
2016-11-25 16:10:37 +00:00
|
|
|
start_import_test
|
2017-10-01 12:25:52 +00:00
|
|
|
end.to raise_error(RuntimeError)
|
2016-11-25 16:10:37 +00:00
|
|
|
end
|
|
|
|
end
|