1
0
Fork 0
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:
Ryuta Kamizono 2020-06-23 22:27:23 +09:00 committed by GitHub
commit 6594dced15
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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