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::Text do
|
|
|
|
it_behaves_like 'Import::OTRS::DynamicField'
|
|
|
|
|
|
|
|
it 'imports an OTRS Text DynamicField' do
|
|
|
|
|
|
|
|
zammad_structure = {
|
|
|
|
object: 'Ticket',
|
|
|
|
name: 'text_example',
|
|
|
|
display: 'Text Example',
|
|
|
|
screens: {
|
|
|
|
view: {
|
|
|
|
'-all-' => {
|
|
|
|
shown: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
active: true,
|
|
|
|
editable: true,
|
|
|
|
position: '8',
|
|
|
|
created_by_id: 1,
|
|
|
|
updated_by_id: 1,
|
|
|
|
data_type: 'input',
|
|
|
|
data_option: {
|
|
|
|
default: '',
|
|
|
|
type: 'text',
|
|
|
|
maxlength: 255,
|
2017-08-23 14:41:01 +00:00
|
|
|
null: true
|
2016-11-25 16:10:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dynamic_field_from_json('text/default', zammad_structure)
|
|
|
|
end
|
|
|
|
end
|