Skip to content

Commit

Permalink
fixup! WIP Integrate ActionMailbox
Browse files Browse the repository at this point in the history
  • Loading branch information
gbp committed Oct 23, 2024
1 parent 3dc110a commit a1a8efc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
7 changes: 0 additions & 7 deletions spec/script/mailin_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,4 @@ def mailin_test(email_filename)
expect(r.status).to eq(0)
expect(r.out).to eq("")
end

# Destroy the incoming message so that it doesn't affect other tests
after do
ir = info_requests(:other_request)
incoming_message = ir.incoming_messages[0]
incoming_message.destroy
end
end
5 changes: 4 additions & 1 deletion spec/support/email_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ def receive_incoming_mail(email_name_or_string, **kargs)
content = load_file_fixture(email_name_or_string) || email_name_or_string
content = gsub_addresses(content.dup, **kargs)
content = ::Mail::Utilities.binary_unsafe_to_crlf(content)
RequestMailer.receive(content)

ActionMailbox::InboundEmail.create_and_extract_message_id!(
content, origin: :mailin, status: :processing
)&.route
end

def get_fixture_mail(filename, email_to = nil, email_from = nil)
Expand Down

0 comments on commit a1a8efc

Please sign in to comment.