From f10a67f2c56c706eeddaa8c50c0d4ceb11462991 Mon Sep 17 00:00:00 2001 From: Mike Perham Date: Sun, 28 Oct 2012 19:49:43 -0700 Subject: [PATCH] Fix web tests --- test/test_web.rb | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/test/test_web.rb b/test/test_web.rb index ab91572d..78656d23 100644 --- a/test/test_web.rb +++ b/test/test_web.rb @@ -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