- get relations_path, :params => { :relations => "#{relation1.id},#{relation2.id},#{relation3.id},#{relation4.id}" }
+ get relations_path(:relations => "#{relation1.id},#{relation2.id},#{relation3.id},#{relation4.id}")
- get relations_path, :params => { :relations => "#{relation1.id},#{relation2.id},#{relation3.id},#{relation4.id}", :format => "json" }
+ get relations_path(:relations => "#{relation1.id},#{relation2.id},#{relation3.id},#{relation4.id}", :format => "json")
assert_equal 1, (js["elements"].count { |a| a["id"] == relation4.id && a["visible"].nil? })
# check error when a non-existent relation is included
assert_equal 1, (js["elements"].count { |a| a["id"] == relation4.id && a["visible"].nil? })
# check error when a non-existent relation is included
- get relations_path, :params => { :relations => "#{relation1.id},#{relation2.id},#{relation3.id},#{relation4.id},0" }
+ get relations_path(:relations => "#{relation1.id},#{relation2.id},#{relation3.id},#{relation4.id},0")
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)
# check the ordering in the history tables:
with_controller(OldRelationsController.new) do
assert_response :success, "can't read back the relation: #{@response.body}"
check_ordering(doc, @response.body)
# check the ordering in the history tables:
with_controller(OldRelationsController.new) do
assert_response :success, "can't read back version 2 of the relation #{relation_id}"
check_ordering(doc, @response.body)
end
assert_response :success, "can't read back version 2 of 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: #{relation_id}"
check_ordering(doc, @response.body)
end
assert_response :success, "can't read back the relation: #{@response.body}"
check_ordering(doc, @response.body)
# check the ordering in the history tables:
with_controller(OldRelationsController.new) do
assert_response :success, "can't read back the relation: #{@response.body}"
check_ordering(doc, @response.body)
# check the ordering in the history tables:
with_controller(OldRelationsController.new) do
assert_response :success, "can't read back version 1 of the relation: #{@response.body}"
check_ordering(doc, @response.body)
end
assert_response :success, "can't read back version 1 of the relation: #{@response.body}"
check_ordering(doc, @response.body)
end
# 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