aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGeorge Claghorn <george@basecamp.com>2018-11-09 13:45:51 -0500
committerGeorge Claghorn <george@basecamp.com>2018-11-09 13:45:51 -0500
commita4d429f4a7c417b719270e9164634c83ded3d0ec (patch)
tree8d8acfa67add80c7b5556e4cb249cdd371edd355 /test
parent5e1a67c67cbfdbec636b310793fe65be6e5bbb4b (diff)
downloadrails-a4d429f4a7c417b719270e9164634c83ded3d0ec.tar.gz
rails-a4d429f4a7c417b719270e9164634c83ded3d0ec.tar.bz2
rails-a4d429f4a7c417b719270e9164634c83ded3d0ec.zip
Discard incineration jobs for missing inbound emails
Diffstat (limited to 'test')
-rw-r--r--test/jobs/incineration_job_test.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/jobs/incineration_job_test.rb b/test/jobs/incineration_job_test.rb
new file mode 100644
index 0000000000..a3907898ab
--- /dev/null
+++ b/test/jobs/incineration_job_test.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+require "test_helper"
+
+class ActionMailbox::IncinerationJobTest < ActiveJob::TestCase
+ setup { @inbound_email = receive_inbound_email_from_fixture("welcome.eml") }
+
+ test "ignoring a missing inbound email" do
+ @inbound_email.destroy!
+
+ perform_enqueued_jobs do
+ assert_nothing_raised do
+ ActionMailbox::IncinerationJob.perform_later @inbound_email
+ end
+ end
+ end
+end