dynamic_field_examples.rb 523 B

1234567891011121314151617
  1. require 'rails_helper'
  2. def dynamic_field_from_json(file, zammad_structure)
  3. expect(ObjectManager::Attribute).to receive(:add).with(zammad_structure)
  4. expect(ObjectManager::Attribute).to receive(:migration_execute)
  5. described_class.new(load_dynamic_field_json(file))
  6. end
  7. def load_dynamic_field_json(file)
  8. json_fixture("import/otrs/dynamic_field/#{file}")
  9. end
  10. RSpec.shared_examples 'Import::OTRS::DynamicField' do
  11. it 'responds to convert_name' do
  12. expect(described_class).to respond_to('convert_name')
  13. end
  14. end