Skip to content

Commit 562846a

Browse files
Allow symbols as queue names in activejob assertions
1 parent c396f20 commit 562846a

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)