mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Fix web tests
This commit is contained in:
parent
aed84fd8b2
commit
f10a67f2c5
1 changed files with 9 additions and 6 deletions
|
@ -27,14 +27,14 @@ class TestWeb < MiniTest::Unit::TestCase
|
|||
it 'can display home' do
|
||||
get '/'
|
||||
assert_equal 200, last_response.status
|
||||
assert_match /Sidekiq is idle/, last_response.body
|
||||
assert_match /status-idle/, last_response.body
|
||||
refute_match /default/, last_response.body
|
||||
end
|
||||
|
||||
it 'can display poll' do
|
||||
get '/poll'
|
||||
assert_equal 200, last_response.status
|
||||
assert_match /hero-unit/, last_response.body
|
||||
assert_match /summary/, last_response.body
|
||||
assert_match /workers/, last_response.body
|
||||
refute_match /navbar/, last_response.body
|
||||
end
|
||||
|
@ -167,13 +167,16 @@ class TestWeb < MiniTest::Unit::TestCase
|
|||
end
|
||||
|
||||
it 'can show user defined tab' do
|
||||
Sidekiq::Web.tabs << 'Custom Tab'
|
||||
begin
|
||||
Sidekiq::Web.tabs['Custom Tab'] = '/custom'
|
||||
|
||||
get '/'
|
||||
assert_match 'Custom Tab', last_response.body
|
||||
|
||||
ensure
|
||||
Sidekiq::Web.tabs.delete 'Custom Tab'
|
||||
end
|
||||
end
|
||||
|
||||
def add_scheduled
|
||||
msg = { 'class' => 'HardWorker',
|
||||
|
|
Loading…
Reference in a new issue