state_update_spec.rb 768 B

123456789101112131415161718192021222324252627
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. require 'lib/import/otrs/history_examples'
  4. RSpec.describe Import::OTRS::History::StateUpdate do
  5. it_behaves_like 'Import::OTRS::History'
  6. it 'imports an OTRS StateUpdate history entry' do
  7. zammad_structure = {
  8. id: '11305',
  9. o_id: '730',
  10. history_type: 'updated',
  11. history_object: 'Ticket',
  12. history_attribute: 'state',
  13. value_from: 'new',
  14. id_from: 1,
  15. value_to: 'open',
  16. id_to: 2,
  17. created_at: '2014-11-21 00:21:08',
  18. created_by_id: '3'
  19. }
  20. history_from_json('state_update/default', zammad_structure)
  21. end
  22. end