Skip to content

Commit

Permalink
Add spec to verify that MessageDelivery Job accepts priority
Browse files Browse the repository at this point in the history
  • Loading branch information
vipulnsward committed Jun 22, 2020
1 parent b91daea commit fa251d9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions actionmailer/test/message_delivery_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ def test_should_enqueue_and_run_correctly_in_activejob
end
end

test "should enqueue a delivery with a priority" do
job = @mail.deliver_later priority: 10
assert_equal 10, job.priority
end

test "should enqueue a delivery at a specific time" do
later_time = Time.current + 1.hour
assert_performed_with(job: ActionMailer::MailDeliveryJob, at: later_time, args: ["DelayedMailer", "test_message", "deliver_now", args: [1, 2, 3]]) do
Expand Down

0 comments on commit fa251d9

Please sign in to comment.