X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/10a4c5cf6e1165a9db6e9b87d0fa19d7f97b51bf..5bb23f6f5f8fed81f1166a15344e44afa7fbb480:/test/controllers/changeset_comments/feeds_controller_test.rb diff --git a/test/controllers/changeset_comments/feeds_controller_test.rb b/test/controllers/changeset_comments/feeds_controller_test.rb index 20db62cef..4858eb085 100644 --- a/test/controllers/changeset_comments/feeds_controller_test.rb +++ b/test/controllers/changeset_comments/feeds_controller_test.rb @@ -68,5 +68,25 @@ module ChangesetComments get changesets_comments_feed_path(:format => "rss", :limit => 100001) assert_response :bad_request end + + def test_feed_timeout + with_settings(:web_timeout => -1) do + get changesets_comments_feed_path + end + assert_response :error + assert_equal "application/rss+xml; charset=utf-8", @response.header["Content-Type"] + assert_dom "rss>channel>title", :text => "OpenStreetMap changeset discussion" + assert_dom "rss>channel>description", :text => /the list of changeset comments you requested took too long to retrieve/ + end + + def test_feed_changeset_timeout + with_settings(:web_timeout => -1) do + get changeset_comments_feed_path(123) + end + assert_response :error + assert_equal "application/rss+xml; charset=utf-8", @response.header["Content-Type"] + assert_dom "rss>channel>title", :text => "OpenStreetMap changeset #123 discussion" + assert_dom "rss>channel>description", :text => /the list of changeset comments you requested took too long to retrieve/ + end end end