Fix changeset comments feed timeout

This commit is contained in:
Anton Khorev 2024-03-24 05:01:05 +03:00
parent e272a384ce
commit 8a84825b02
4 changed files with 32 additions and 13 deletions

View file

@ -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