mercredi 8 juillet 2020

Add attachments with ActionMailbox TestHelper

I want to test attachments with the Action Mailbox TestHelper. I see the options for the test helper get passed to the mail object but I can't seem to add attachments. They end up being nil.

This is what I have:

receive_inbound_email_from_mail(
      attachments: [
        File.new(File.join(File.dirname(__FILE__), '../support/fixtures/image.jpeg'))
      ],
      from: 'from@covfefe.test,
      to: 'acme@example.test'
)

How does it work?

Aucun commentaire:

Enregistrer un commentaire