text_area_spec.rb 932 B

1234567891011121314151617181920212223242526272829303132333435363738
  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::TextArea do
  5. it_behaves_like 'Import::OTRS::DynamicField'
  6. it 'imports an OTRS TextArea DynamicField' do
  7. zammad_structure = {
  8. object: 'Ticket',
  9. name: 'text_area_example',
  10. display: 'TextArea Example',
  11. screens: {
  12. view: {
  13. '-all-' => {
  14. shown: true
  15. }
  16. }
  17. },
  18. active: true,
  19. editable: true,
  20. position: '8',
  21. created_by_id: 1,
  22. updated_by_id: 1,
  23. data_type: 'textarea',
  24. data_option: {
  25. default: '',
  26. rows: '20',
  27. null: true,
  28. maxlength: 3000,
  29. }
  30. }
  31. dynamic_field_from_json('text_area/default', zammad_structure)
  32. end
  33. end