assert checkrelation.visible,
"saved relation is not visible"
# ok the relation is there but can we also retrieve it?
assert checkrelation.visible,
"saved relation is not visible"
# ok the relation is there but can we also retrieve it?
assert checkrelation.visible,
"saved relation is not visible"
# ok the relation is there but can we also retrieve it?
assert checkrelation.visible,
"saved relation is not visible"
# ok the relation is there but can we also retrieve it?
auth_header = basic_authorization_header user.email, "test"
with_relation(relation.id) do |rel|
update_changeset(rel, changeset.id)
auth_header = basic_authorization_header user.email, "test"
with_relation(relation.id) do |rel|
update_changeset(rel, changeset.id)
"should be able to delete a relation used in an old relation (#{@response.body})"
# this won't work since the relation never existed
"should be able to delete a relation used in an old relation (#{@response.body})"
# this won't work since the relation never existed
assert_response :success, "can't update relation for add #{element.class}/bbox test: #{@response.body}"
# get it back and check the ordering
assert_response :success, "can't update relation for add #{element.class}/bbox test: #{@response.body}"
# get it back and check the ordering
assert_response :success, "can't read back the relation: #{@response.body}"
check_ordering(doc, @response.body)
assert_response :success, "can't read back the relation: #{@response.body}"
check_ordering(doc, @response.body)
assert_response :success, "can't update relation: #{@response.body}"
assert_equal 2, @response.body.to_i
# get it back again and check the ordering again
assert_response :success, "can't update relation: #{@response.body}"
assert_equal 2, @response.body.to_i
# get it back again and check the ordering again
assert_response :success, "can't read back the relation: #{@response.body}"
check_ordering(doc, @response.body)
assert_response :success, "can't read back the relation: #{@response.body}"
check_ordering(doc, @response.body)
assert_response :success, "can't read back the relation: #{relation_id}"
check_ordering(doc, @response.body)
end
assert_response :success, "can't read back the relation: #{relation_id}"
check_ordering(doc, @response.body)
end
assert_response :success, "can't read back the relation: #{@response.body}"
check_ordering(doc, @response.body)
assert_response :success, "can't read back the relation: #{@response.body}"
check_ordering(doc, @response.body)
else
with_controller(OldRelationsController.new) do
get api_old_relation_path(:id => id, :version => ver)
else
with_controller(OldRelationsController.new) do
get api_old_relation_path(:id => id, :version => ver)
# the parsed XML doc is returned.
def with_update(rel, headers)
rel_id = rel.find("//osm/relation").first["id"].to_i
# the parsed XML doc is returned.
def with_update(rel, headers)
rel_id = rel.find("//osm/relation").first["id"].to_i
assert_response :success, "can't update relation: #{@response.body}"
version = @response.body.to_i
# now get the new version
assert_response :success, "can't update relation: #{@response.body}"
version = @response.body.to_i
# now get the new version