mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #39701 from vipulnsward/add-mailer-spec
Add spec to verify that MessageDelivery Job accepts priority
This commit is contained in:
commit
6594dced15
1 changed files with 5 additions and 0 deletions
|
@ -83,6 +83,11 @@ class MessageDeliveryTest < ActiveSupport::TestCase
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue