Skip to content

Commit eac3208

Browse files
authored
Merge pull request rails#48071 from shivamsinghchahar/add-tests-for-aj-to-verify-queue-name-passed-as-symbols
Add tests for AJ to verify queue name passed as symbol
2 parents a933125 + 17d1b83 commit eac3208

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)