- content "<osm><relation changeset='#{private_changeset.id}'>" +
- "<member ref='#{node.id}' type='node' role='some'/>" +
+ content "<osm><relation changeset='#{private_changeset.id}'>" \
+ "<member ref='#{node.id}' type='node' role='some'/>" \
###
# create an relation with a node as member, this time test that we don't
# need a role attribute to be included
###
# create an relation with a node as member, this time test that we don't
# need a role attribute to be included
"<member ref='#{node.id}' type='node'/>" + "<tag k='test' v='yes' /></relation></osm>"
put :create
# hope for forbidden due to user
"<member ref='#{node.id}' type='node'/>" + "<tag k='test' v='yes' /></relation></osm>"
put :create
# hope for forbidden due to user
- content "<osm><relation changeset='#{private_changeset.id}'>" +
- "<member type='node' ref='#{node.id}' role='some'/>" +
- "<member type='way' ref='#{way.id}' role='other'/>" +
+ content "<osm><relation changeset='#{private_changeset.id}'>" \
+ "<member type='node' ref='#{node.id}' role='some'/>" \
+ "<member type='way' ref='#{way.id}' role='other'/>" \
"<tag k='test' v='yes' /></relation></osm>"
put :create
# hope for forbidden, due to user
"<tag k='test' v='yes' /></relation></osm>"
put :create
# hope for forbidden, due to user
- content "<osm><relation changeset='#{changeset.id}'>" +
- "<member ref='#{node.id}' type='node' role='some'/>" +
+ content "<osm><relation changeset='#{changeset.id}'>" \
+ "<member ref='#{node.id}' type='node' role='some'/>" \
###
# create an relation with a node as member, this time test that we don't
# need a role attribute to be included
###
# create an relation with a node as member, this time test that we don't
# need a role attribute to be included
- content "<osm><relation changeset='#{changeset.id}'>" +
- "<member type='node' ref='#{node.id}' role='some'/>" +
- "<member type='way' ref='#{way.id}' role='other'/>" +
+ content "<osm><relation changeset='#{changeset.id}'>" \
+ "<member type='node' ref='#{node.id}' role='some'/>" \
+ "<member type='way' ref='#{way.id}' role='other'/>" \
basic_authorization user.email, "test"
# create a relation with non-existing node as member
basic_authorization user.email, "test"
# create a relation with non-existing node as member
- content "<osm><relation changeset='#{changeset.id}'>" +
- "<member type='node' ref='0'/><tag k='test' v='yes' />" +
+ content "<osm><relation changeset='#{changeset.id}'>" \
+ "<member type='node' ref='0'/><tag k='test' v='yes' />" \
basic_authorization user.email, "test"
# create some xml that should return an error
basic_authorization user.email, "test"
# create some xml that should return an error
- content "<osm><relation changeset='#{changeset.id}'>" +
- "<member type='type' ref='#{node.id}' role=''/>" +
+ content "<osm><relation changeset='#{changeset.id}'>" \
+ "<member type='type' ref='#{node.id}' role=''/>" \
assert_response :unauthorized
## Then try with the private user, to make sure that you get a forbidden
assert_response :unauthorized
## Then try with the private user, to make sure that you get a forbidden
# this shouldn't work, as we should need the payload...
delete :delete, :params => { :id => relation.id }
# this shouldn't work, as we should need the payload...
delete :delete, :params => { :id => relation.id }
# this shouldn't work, as we should need the payload...
delete :delete, :params => { :id => relation.id }
# this shouldn't work, as we should need the payload...
delete :delete, :params => { :id => relation.id }
way1 = create(:way_with_nodes, :nodes_count => 2)
way2 = create(:way_with_nodes, :nodes_count => 2)
way1 = create(:way_with_nodes, :nodes_count => 2)
way2 = create(:way_with_nodes, :nodes_count => 2)
# that the changeset bounding box is +bbox+.
def check_changeset_modify(bbox)
## First test with the private user to check that you get a forbidden
# that the changeset bounding box is +bbox+.
def check_changeset_modify(bbox)
## First test with the private user to check that you get a forbidden
# create a new changeset for this operation, so we are assured
# that the bounding box will be newly-generated.
# create a new changeset for this operation, so we are assured
# that the bounding box will be newly-generated.
# create a new changeset for this operation, so we are assured
# that the bounding box will be newly-generated.
# create a new changeset for this operation, so we are assured
# that the bounding box will be newly-generated.
assert_equal a_tags.keys, b_tags.keys, "Tag keys should be identical."
a_tags.each do |k, v|
assert_equal v, b_tags[k],
assert_equal a_tags.keys, b_tags.keys, "Tag keys should be identical."
a_tags.each do |k, v|
assert_equal v, b_tags[k],