diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2018-09-19 15:20:04 -0700 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2018-09-19 15:20:04 -0700 |
commit | 3c8fc4e9ae53af9739a0e84b1141a79e03552d4a (patch) | |
tree | fa49358fc9eb5e1deb681de5d45eeadc340340a3 /test | |
parent | c6cae759ef0cb9063dc26015132804a6218281b7 (diff) | |
download | rails-3c8fc4e9ae53af9739a0e84b1141a79e03552d4a.tar.gz rails-3c8fc4e9ae53af9739a0e84b1141a79e03552d4a.tar.bz2 rails-3c8fc4e9ae53af9739a0e84b1141a79e03552d4a.zip |
Add incineration by default
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/inbound_email/incineration_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/unit/inbound_email/incineration_test.rb b/test/unit/inbound_email/incineration_test.rb new file mode 100644 index 0000000000..10a6e564f8 --- /dev/null +++ b/test/unit/inbound_email/incineration_test.rb @@ -0,0 +1,14 @@ +require_relative '../../test_helper' + +class ActionMailroom::InboundEmail::IncinerationTest < ActiveSupport::TestCase + include ActiveJob::TestHelper + + test "incinerate emails 30 days after they have been processed" do + freeze_time + + assert_enqueued_with job: ActionMailroom::InboundEmail::IncinerationJob, at: 30.days.from_now do + inbound_email = create_inbound_email("welcome.eml") + inbound_email.delivered! + end + end +end |