Skip to content

Commit 17d1b83

Browse files
Add tests for AJ to verify queue name passed as symbol. Ref: rails#48034
1 parent 5940955 commit 17d1b83

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

activejob/test/cases/test_helper_test.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,12 @@ def test_assert_enqueued_with_with_no_block
509509
assert_enqueued_with(job: LoggingJob, queue: "default")
510510
end
511511

512+
def test_assert_enqueued_with_when_queue_name_is_symbol
513+
assert_enqueued_with(job: LoggingJob, queue: :default) do
514+
LoggingJob.set(wait_until: Date.tomorrow.noon).perform_later
515+
end
516+
end
517+
512518
def test_assert_enqueued_with_returns
513519
job = assert_enqueued_with(job: LoggingJob) do
514520
LoggingJob.set(wait_until: 5.minutes.from_now).perform_later(1, 2, 3, keyword: true)
@@ -1779,6 +1785,12 @@ def test_assert_performed_with_without_block
17791785
assert_performed_with(job: NestedJob, queue: "default")
17801786
end
17811787

1788+
def test_assert_performed_with_when_queue_name_is_symbol
1789+
assert_performed_with(job: NestedJob, queue: :default) do
1790+
NestedJob.perform_later
1791+
end
1792+
end
1793+
17821794
def test_assert_performed_with_returns
17831795
job = assert_performed_with(job: LoggingJob, queue: "default") do
17841796
LoggingJob.perform_later(keyword: :sym)

0 commit comments

Comments
 (0)