basic_authorization users(:normal_user).email, "test"
# Create the first user's changeset
content "<osm><changeset>" +
basic_authorization users(:normal_user).email, "test"
# Create the first user's changeset
content "<osm><changeset>" +
put :create
assert_require_public_data
basic_authorization users(:public_user).email, "test"
# Create the first user's changeset
content "<osm><changeset>" +
put :create
assert_require_public_data
basic_authorization users(:public_user).email, "test"
# Create the first user's changeset
content "<osm><changeset>" +
basic_authorization users(:public_user).email, "test"
content "<osm><changeset>" +
basic_authorization users(:public_user).email, "test"
content "<osm><changeset>" +
diff.root = XML::Node.new "osmChange"
modify = XML::Node.new "modify"
xml_old_node = old_node.to_xml_node
diff.root = XML::Node.new "osmChange"
modify = XML::Node.new "modify"
xml_old_node = old_node.to_xml_node
basic_authorization users(:public_user).email, "test"
content "<osm><changeset>" +
basic_authorization users(:public_user).email, "test"
content "<osm><changeset>" +
["<osmChange/>",
"<osmChange></osmChange>",
"<osmChange><modify/></osmChange>",
["<osmChange/>",
"<osmChange></osmChange>",
"<osmChange><modify/></osmChange>",
get :query, :closed => "true"
assert_response :success, "can't get changesets by closed-ness"
get :query, :closed => "true"
assert_response :success, "can't get changesets by closed-ness"
- assert_changesets [3, 5, 6, 7, 8]
+ assert_changesets [3, 5, 6, 7, 8, 9]
get :query, :closed => "true", :user => users(:normal_user).id
assert_response :success, "can't get changesets by closed-ness and user"
get :query, :closed => "true", :user => users(:normal_user).id
assert_response :success, "can't get changesets by closed-ness and user"
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
# check the result of a list
def check_list_result(changesets)
changesets = changesets.where("num_changes > 0")
# check the result of a list
def check_list_result(changesets)
changesets = changesets.where("num_changes > 0")
assert changesets.size <= 20
assert_select "ol.changesets", :count => [changesets.size, 1].min do
assert changesets.size <= 20
assert_select "ol.changesets", :count => [changesets.size, 1].min do
# check the result of a feed
def check_feed_result(changesets)
changesets = changesets.where("num_changes > 0")
# check the result of a feed
def check_feed_result(changesets)
changesets = changesets.where("num_changes > 0")
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