assert_select "osm way[id=#{way.id}][version=#{way.version}][visible=#{way.visible}]", 1
# check that each node in the way appears once in the output as a
assert_select "osm way[id=#{way.id}][version=#{way.version}][visible=#{way.visible}]", 1
# check that each node in the way appears once in the output as a
- # reference and as the node element. note the slightly dodgy assumption
- # that nodes appear only once. this is currently the case with the
- # fixtures, but it doesn't have to be.
+ # reference and as the node element.
# expect failure
assert_response :precondition_failed,
"way upload with invalid node did not return 'precondition failed'"
# expect failure
assert_response :precondition_failed,
"way upload with invalid node did not return 'precondition failed'"
- assert_equal "Precondition failed: Way requires the node with id 0, which either does not exist, or is not visible.", @response.body
+ assert_equal "Precondition failed: Way requires the nodes with id in (0), which either do not exist, or are not visible.", @response.body
delete :delete, :id => current_ways(:visible_way).id
assert_response :forbidden
delete :delete, :id => current_ways(:visible_way).id
assert_response :forbidden
delete :delete, :id => current_ways(:visible_way).id
assert_response :bad_request
delete :delete, :id => current_ways(:visible_way).id
assert_response :bad_request
put :update, :id => current_ways(:visible_way).id
assert_response :bad_request,
"adding a duplicate tag to a way should fail with 'bad request'"
put :update, :id => current_ways(:visible_way).id
assert_response :bad_request,
"adding a duplicate tag to a way should fail with 'bad request'"
put :update, :id => current_ways(:visible_way).id
assert_response :bad_request,
"adding new duplicate tags to a way should fail with 'bad request'"
put :update, :id => current_ways(:visible_way).id
assert_response :bad_request,
"adding new duplicate tags to a way should fail with 'bad request'"
put :create
assert_response :bad_request,
"adding new duplicate tags to a way should fail with 'bad request'"
put :create
assert_response :bad_request,
"adding new duplicate tags to a way should fail with 'bad request'"