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>",
assert_select "osmChange[version='#{API_VERSION}'][generator='#{GENERATOR}']" do
assert_select "create", :count => 5
assert_select "create>node[id='#{nodes(:used_node_2).node_id}'][visible='#{nodes(:used_node_2).visible?}'][version='#{nodes(:used_node_2).version}']" do
assert_select "osmChange[version='#{API_VERSION}'][generator='#{GENERATOR}']" do
assert_select "create", :count => 5
assert_select "create>node[id='#{nodes(:used_node_2).node_id}'][visible='#{nodes(:used_node_2).visible?}'][version='#{nodes(:used_node_2).version}']" do
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