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
|
it 'can display home' do
|
||||||
get '/'
|
get '/'
|
||||||
assert_equal 200, last_response.status
|
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
|
refute_match /default/, last_response.body
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'can display poll' do
|
it 'can display poll' do
|
||||||
get '/poll'
|
get '/poll'
|
||||||
assert_equal 200, last_response.status
|
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
|
assert_match /workers/, last_response.body
|
||||||
refute_match /navbar/, last_response.body
|
refute_match /navbar/, last_response.body
|
||||||
end
|
end
|
||||||
|
@ -167,12 +167,15 @@ class TestWeb < MiniTest::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'can show user defined tab' do
|
it 'can show user defined tab' do
|
||||||
Sidekiq::Web.tabs << 'Custom Tab'
|
begin
|
||||||
|
Sidekiq::Web.tabs['Custom Tab'] = '/custom'
|
||||||
|
|
||||||
get '/'
|
get '/'
|
||||||
assert_match 'Custom Tab', last_response.body
|
assert_match 'Custom Tab', last_response.body
|
||||||
|
|
||||||
Sidekiq::Web.tabs.delete 'Custom Tab'
|
ensure
|
||||||
|
Sidekiq::Web.tabs.delete 'Custom Tab'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def add_scheduled
|
def add_scheduled
|
||||||
|
|
Loading…
Reference in a new issue