diff options
Diffstat (limited to 'actionmailbox/test')
-rw-r--r-- | actionmailbox/test/dummy/db/schema.rb | 1 | ||||
-rw-r--r-- | actionmailbox/test/unit/inbound_email/incineration_test.rb | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/actionmailbox/test/dummy/db/schema.rb b/actionmailbox/test/dummy/db/schema.rb index 10d4111a89..76c979bcec 100644 --- a/actionmailbox/test/dummy/db/schema.rb +++ b/actionmailbox/test/dummy/db/schema.rb @@ -42,4 +42,5 @@ ActiveRecord::Schema.define(version: 2018_02_12_164506) do t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true end + add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id" end diff --git a/actionmailbox/test/unit/inbound_email/incineration_test.rb b/actionmailbox/test/unit/inbound_email/incineration_test.rb index 21c01a9cea..54488349fd 100644 --- a/actionmailbox/test/unit/inbound_email/incineration_test.rb +++ b/actionmailbox/test/unit/inbound_email/incineration_test.rb @@ -44,4 +44,14 @@ class ActionMailbox::InboundEmail::IncinerationTest < ActiveSupport::TestCase perform_enqueued_jobs only: ActionMailbox::IncinerationJob end end + + test "skipping incineration" do + original, ActionMailbox.incinerate = ActionMailbox.incinerate, false + + assert_no_enqueued_jobs only: ActionMailbox::IncinerationJob do + create_inbound_email_from_fixture("welcome.eml").delivered! + end + ensure + ActionMailbox.incinerate = original + end end |