Fixed issue #519 - Mails get imported as text/html instead of text/plain.
This commit is contained in:
parent
9b9f9ed8c5
commit
0646b9dc25
2 changed files with 22 additions and 37 deletions
|
@ -16,6 +16,7 @@ module Import
|
||||||
MessageID: :message_id,
|
MessageID: :message_id,
|
||||||
#ReplyTo: :reply_to,
|
#ReplyTo: :reply_to,
|
||||||
References: :references,
|
References: :references,
|
||||||
|
ContentType: :content_type,
|
||||||
Changed: :updated_at,
|
Changed: :updated_at,
|
||||||
Created: :created_at,
|
Created: :created_at,
|
||||||
ChangedBy: :updated_by_id,
|
ChangedBy: :updated_by_id,
|
||||||
|
|
|
@ -27,9 +27,8 @@ RSpec.describe Import::OTRS::Article do
|
||||||
context 'customer phone' do
|
context 'customer phone' do
|
||||||
|
|
||||||
let(:object_structure) { load_article_json('customer_phone_attachment') }
|
let(:object_structure) { load_article_json('customer_phone_attachment') }
|
||||||
|
let(:zammad_structure) {
|
||||||
it 'creates' do
|
{
|
||||||
zammad_structure = {
|
|
||||||
created_by_id: '3',
|
created_by_id: '3',
|
||||||
updated_by_id: 1,
|
updated_by_id: 1,
|
||||||
ticket_id: '730',
|
ticket_id: '730',
|
||||||
|
@ -38,6 +37,7 @@ RSpec.describe Import::OTRS::Article do
|
||||||
from: '"Betreuter Kunde" <kunde2@kunde.de>,',
|
from: '"Betreuter Kunde" <kunde2@kunde.de>,',
|
||||||
to: 'Postmaster',
|
to: 'Postmaster',
|
||||||
cc: '',
|
cc: '',
|
||||||
|
content_type: 'text/plain; charset=utf-8',
|
||||||
subject: 'test #3',
|
subject: 'test #3',
|
||||||
in_reply_to: '',
|
in_reply_to: '',
|
||||||
message_id: '',
|
message_id: '',
|
||||||
|
@ -48,30 +48,14 @@ RSpec.describe Import::OTRS::Article do
|
||||||
internal: false,
|
internal: false,
|
||||||
sender_id: 2
|
sender_id: 2
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
it 'creates' do
|
||||||
expect(Import::OTRS::Article::AttachmentFactory).to receive(:import)
|
expect(Import::OTRS::Article::AttachmentFactory).to receive(:import)
|
||||||
creates_with(zammad_structure)
|
creates_with(zammad_structure)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'updates' do
|
it 'updates' do
|
||||||
zammad_structure = {
|
|
||||||
created_by_id: '3',
|
|
||||||
updated_by_id: 1,
|
|
||||||
ticket_id: '730',
|
|
||||||
id: '3970',
|
|
||||||
body: 'test #3',
|
|
||||||
from: '"Betreuter Kunde" <kunde2@kunde.de>,',
|
|
||||||
to: 'Postmaster',
|
|
||||||
cc: '',
|
|
||||||
subject: 'test #3',
|
|
||||||
in_reply_to: '',
|
|
||||||
message_id: '',
|
|
||||||
references: '',
|
|
||||||
updated_at: '2014-11-21 00:21:08',
|
|
||||||
created_at: '2014-11-21 00:17:41',
|
|
||||||
type_id: 5,
|
|
||||||
internal: false,
|
|
||||||
sender_id: 2
|
|
||||||
}
|
|
||||||
expect(Import::OTRS::Article::AttachmentFactory).to receive(:import)
|
expect(Import::OTRS::Article::AttachmentFactory).to receive(:import)
|
||||||
updates_with(zammad_structure)
|
updates_with(zammad_structure)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue