mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
re-establish Web UI test by stubbing time.now, #4149
This commit is contained in:
parent
da05cc832e
commit
0089c7162b
1 changed files with 13 additions and 0 deletions
|
@ -114,6 +114,19 @@ describe Sidekiq::Web do
|
|||
assert_match(/foo/, last_response.body)
|
||||
refute_match(/HardWorker/, last_response.body)
|
||||
assert_match(/0.0/, last_response.body)
|
||||
refute_match(/datetime/, last_response.body)
|
||||
Sidekiq::Queue.new("foo").clear
|
||||
|
||||
Time.stub(:now, Time.now - 65) do
|
||||
assert Sidekiq::Client.push('queue' => :foo, 'class' => WebWorker, 'args' => [1, 3])
|
||||
end
|
||||
|
||||
get '/queues'
|
||||
assert_equal 200, last_response.status
|
||||
assert_match(/foo/, last_response.body)
|
||||
refute_match(/HardWorker/, last_response.body)
|
||||
assert_match(/65.0/, last_response.body)
|
||||
assert_match(/datetime/, last_response.body)
|
||||
end
|
||||
|
||||
it 'handles queue view' do
|
||||
|
|
Loading…
Add table
Reference in a new issue