diff --git a/test/test_web.rb b/test/test_web.rb index 45045944..1eb14548 100644 --- a/test/test_web.rb +++ b/test/test_web.rb @@ -295,6 +295,12 @@ class TestWeb < Sidekiq::Test assert_match /#{msg['args'][2]}/, last_response.body end + it 'calls updatePage() once when polling' do + get '/busy?poll=true' + assert_equal 200, last_response.status + assert_equal 1, last_response.body.scan('updatePage(').count + end + it 'escape job args and error messages' do # on /retries page params = add_xss_retry diff --git a/web/views/_nav.erb b/web/views/_nav.erb index 8ddcd5fb..e7c3da1c 100644 --- a/web/views/_nav.erb +++ b/web/views/_nav.erb @@ -7,7 +7,7 @@
<%= erb :_footer %> + <%= erb :_poll_js %>