trabajo-afectivo/spec/lib/import/otrs/dynamic_field/multiselect_spec.rb

43 lines
1,007 B
Ruby
Raw Normal View History

require 'rails_helper'
require 'lib/import/otrs/dynamic_field_examples'
RSpec.describe Import::OTRS::DynamicField::Multiselect do
it_behaves_like 'Import::OTRS::DynamicField'
it 'imports an OTRS Multiselect DynamicField' do
zammad_structure = {
object: 'Ticket',
name: 'multiselect_example',
display: 'Multiselec tExample',
screens: {
view: {
'-all-' => {
shown: true
}
}
},
active: true,
editable: true,
position: '4',
created_by_id: 1,
updated_by_id: 1,
data_type: 'select',
data_option: {
default: '',
multiple: true,
options: {
'Hamburg' => 'Hamburg',
'München' => 'München',
'Köln' => 'Köln',
'Berlin' => 'Berlin'
},
null: false,
translate: false
}
}
dynamic_field_from_json('multiselect/default', zammad_structure)
end
end