aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/inbound_email/incineration_test.rb
blob: f2464b8cb88875dc982404e6f7e7c199a9f355c8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
require_relative '../../test_helper'

class ActionMailroom::InboundEmail::IncinerationTest < ActiveSupport::TestCase
  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
      create_inbound_email("welcome.eml").delivered!
    end
  end
end