File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,24 @@ def self.exception
163163 assert_equal %w( jobs high critical blahblah ) . sort , processed_queues
164164 end
165165
166+ it "can work with dynamically added queues when using wildcard" do
167+ worker = Resque ::Worker . new ( "*" )
168+
169+ assert_equal [ "jobs" ] , Resque . queues
170+
171+ Resque ::Job . create ( :high , GoodJob )
172+ Resque ::Job . create ( :critical , GoodJob )
173+ Resque ::Job . create ( :blahblah , GoodJob )
174+
175+ processed_queues = [ ]
176+
177+ worker . work ( 0 ) do |job |
178+ processed_queues << job . queue
179+ end
180+
181+ assert_equal %w( jobs high critical blahblah ) . sort , processed_queues
182+ end
183+
166184 it "has a unique id" do
167185 assert_equal "#{ `hostname` . chomp } :#{ $$} :jobs" , @worker . to_s
168186 end
You can’t perform that action at this time.
0 commit comments