dynamic_field_spec.rb 592 B

123456789101112131415161718
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. require 'lib/import/otrs/dynamic_field_examples'
  4. RSpec.describe Import::OTRS::DynamicField do
  5. let(:object_structure) { load_dynamic_field_json('text/default') }
  6. let(:start_import_test) { described_class.new(object_structure) }
  7. it_behaves_like 'Import::OTRS::DynamicField'
  8. it 'requires an implementation of init_callback' do
  9. allow(ObjectManager::Attribute).to receive(:get).and_return(false)
  10. expect do
  11. start_import_test
  12. end.to raise_error(RuntimeError)
  13. end
  14. end