X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/51c5be98f7c10e077d22488434365a626da5a893..c3ad6aa2923c03aeeea0b57033b0a9238d262aa2:/test/controllers/way_controller_test.rb?ds=sidebyside diff --git a/test/controllers/way_controller_test.rb b/test/controllers/way_controller_test.rb index 8226f435c..ccf299455 100644 --- a/test/controllers/way_controller_test.rb +++ b/test/controllers/way_controller_test.rb @@ -121,8 +121,8 @@ class WayControllerTest < ActionController::TestCase # create a way with pre-existing nodes content "" + - "" + - "" + "" + + "" put :create # hope for failure assert_response :forbidden, @@ -138,8 +138,8 @@ class WayControllerTest < ActionController::TestCase # create a way with pre-existing nodes content "" + - "" + - "" + "" + + "" put :create # hope for success assert_response :success, @@ -179,7 +179,7 @@ class WayControllerTest < ActionController::TestCase # create a way with non-existing node content "" + - "" + "" put :create # expect failure assert_response :forbidden, @@ -187,7 +187,7 @@ class WayControllerTest < ActionController::TestCase # create a way with no nodes content "" + - "" + "" put :create # expect failure assert_response :forbidden, @@ -195,7 +195,7 @@ class WayControllerTest < ActionController::TestCase # create a way inside a closed changeset content "" + - "" + "" put :create # expect failure assert_response :forbidden, @@ -211,7 +211,7 @@ class WayControllerTest < ActionController::TestCase # create a way with non-existing node content "" + - "" + "" put :create # expect failure assert_response :precondition_failed, @@ -220,7 +220,7 @@ class WayControllerTest < ActionController::TestCase # create a way with no nodes content "" + - "" + "" put :create # expect failure assert_response :precondition_failed, @@ -229,7 +229,7 @@ class WayControllerTest < ActionController::TestCase # create a way inside a closed changeset content "" + - "" + "" put :create # expect failure assert_response :conflict, @@ -237,9 +237,9 @@ class WayControllerTest < ActionController::TestCase # create a way with a tag which is too long content "" + - "" + - "" + - "" + "" + + "" + + "" put :create # expect failure assert_response :bad_request, @@ -673,8 +673,7 @@ class WayControllerTest < ActionController::TestCase # check that the set of IDs match expectations expected_way_ids = [current_ways(:visible_way).id, - current_ways(:used_way).id - ] + current_ways(:used_way).id] found_way_ids = ways_xml.find("//osm/way").collect { |w| w["id"].to_i } assert_equal expected_way_ids.sort, found_way_ids.sort, "expected ways for node #{current_nodes(:used_node_1).id} did not match found"