mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Add 'Retry Now' button test
This commit is contained in:
parent
897bf319eb
commit
e398967965
1 changed files with 13 additions and 5 deletions
|
@ -106,11 +106,7 @@ class TestWeb < MiniTest::Unit::TestCase
|
|||
end
|
||||
|
||||
it 'can delete a single retry' do
|
||||
Sidekiq.redis do |conn|
|
||||
conn.del('retry')
|
||||
end
|
||||
|
||||
score = add_retry[1].to_s
|
||||
_, score = add_retry
|
||||
|
||||
post "/retries/#{score}", 'delete' => 'Delete'
|
||||
assert_equal 302, last_response.status
|
||||
|
@ -120,6 +116,18 @@ class TestWeb < MiniTest::Unit::TestCase
|
|||
assert_equal 200, last_response.status
|
||||
refute_match /#{score}/, last_response.body
|
||||
end
|
||||
|
||||
it 'can retry a single retry now' do
|
||||
msg, score = add_retry
|
||||
|
||||
post "/retries/#{score}", 'retry' => 'Retry'
|
||||
assert_equal 302, last_response.status
|
||||
assert_equal 'http://example.org/', last_response.header['Location']
|
||||
|
||||
get '/queues/default'
|
||||
assert_equal 200, last_response.status
|
||||
assert_match /#{msg['args'][2]}/, last_response.body
|
||||
end
|
||||
|
||||
def add_scheduled
|
||||
msg = { 'class' => 'HardWorker',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue