Skip to content

Commit bad9aa1

Browse files
authored
Merge pull request rails#48034 from shivamsinghchahar/allow-symbols-as-queue-name-in-activejob-assertions
Allow symbols as queue names in activejob test assertions
2 parents 6ac6b0b + 562846a commit bad9aa1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

activejob/lib/active_job/test_helper.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,10 @@ def flush_enqueued_jobs(only: nil, except: nil, queue: nil, at: nil)
694694

695695
def prepare_args_for_assertion(args)
696696
args.dup.tap do |arguments|
697+
if arguments[:queue].is_a?(Symbol)
698+
arguments[:queue] = arguments[:queue].to_s
699+
end
700+
697701
if arguments[:at].acts_like?(:time)
698702
at_range = arguments[:at] - 1..arguments[:at] + 1
699703
arguments[:at] = ->(at) { at_range.cover?(at) }

0 commit comments

Comments
 (0)