assert_select "osm>changeset>discussion>comment", 0
changeset_id = changesets(:normal_user_closed_change).id
assert_select "osm>changeset>discussion>comment", 0
changeset_id = changesets(:normal_user_closed_change).id
get :read, :id => changeset_id, :include_discussion => true
assert_response :success, "cannot get closed changeset with comments"
get :read, :id => changeset_id, :include_discussion => true
assert_response :success, "cannot get closed changeset with comments"
["<osmChange/>",
"<osmChange></osmChange>",
"<osmChange><modify/></osmChange>",
["<osmChange/>",
"<osmChange></osmChange>",
"<osmChange><modify/></osmChange>",
get :query, :bbox => bbox
assert_response :bad_request, "'#{bbox}' isn't a bbox"
end
get :query, :bbox => bbox
assert_response :bad_request, "'#{bbox}' isn't a bbox"
end
get :query, :time => time
assert_response :bad_request, "'#{time}' isn't a valid time range"
end
get :query, :time => time
assert_response :bad_request, "'#{time}' isn't a valid time range"
end
assert_equal true, comment.visible
post :hide_comment, :id => comment.id
assert_equal true, comment.visible
post :hide_comment, :id => comment.id
assert_equal true, comment.visible
basic_authorization(users(:moderator_user).email, "test")
assert_equal true, comment.visible
basic_authorization(users(:moderator_user).email, "test")
assert_equal false, comment.visible
post :unhide_comment, :id => comment.id
assert_equal false, comment.visible
post :unhide_comment, :id => comment.id
assert_equal false, comment.visible
basic_authorization(users(:moderator_user).email, "test")
assert_equal false, comment.visible
basic_authorization(users(:moderator_user).email, "test")
get :comments_feed, :format => "rss"
assert_response :success
assert_equal "application/rss+xml", @response.content_type
get :comments_feed, :format => "rss"
assert_response :success
assert_equal "application/rss+xml", @response.content_type
assert changesets.size <= 20
assert_select "feed", :count => [changesets.size, 1].min do
assert changesets.size <= 20
assert_select "feed", :count => [changesets.size, 1].min do
- assert_select "entry", :count => changesets.size
+ assert_select "> title", :count => 1, :text => /^Changesets/
+ assert_select "> entry", :count => changesets.size