fix: Update email message_id parsing order (#3073)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Tejaswini Chile
2021-10-12 20:46:00 +05:30
committed by GitHub
parent 6bfa551c85
commit 6998e9aa2d
9 changed files with 818 additions and 48 deletions

View File

@@ -6,6 +6,7 @@ RSpec.describe ApplicationMailbox, type: :mailbox do
describe 'route the inbound mail to appropriate mailbox' do
let(:welcome_mail) { create_inbound_email_from_fixture('welcome.eml') }
let(:reply_mail) { create_inbound_email_from_fixture('reply.eml') }
let(:reply_mail_without_uuid) { create_inbound_email_from_fixture('reply.eml') }
let(:support_mail) { create_inbound_email_from_fixture('support.eml') }
describe 'Default' do
@@ -24,6 +25,13 @@ RSpec.describe ApplicationMailbox, type: :mailbox do
expect(dbl).to receive(:perform_processing).and_return(true)
described_class.route reply_mail
end
it 'routes reply emails to Reply Mailbox without uuid' do
dbl = double
expect(ReplyMailbox).to receive(:new).and_return(dbl)
expect(dbl).to receive(:perform_processing).and_return(true)
described_class.route reply_mail_without_uuid
end
end
describe 'Support' do