1
0
Fork 0
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:
Mike Perham 2012-10-28 19:49:43 -07:00
parent aed84fd8b2
commit f10a67f2c5

View file

@ -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,12 +167,15 @@ 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
get '/'
assert_match 'Custom Tab', last_response.body
Sidekiq::Web.tabs.delete 'Custom Tab'
ensure
Sidekiq::Web.tabs.delete 'Custom Tab'
end
end
def add_scheduled