X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/ef7f3d800cbdd49b692df10d312e5fd880e2e938..4bb9f96133e04872739b7f40034521b5b4de6a2d:/test/controllers/way_controller_test.rb diff --git a/test/controllers/way_controller_test.rb b/test/controllers/way_controller_test.rb index 3ae7aa36e..ee6833889 100644 --- a/test/controllers/way_controller_test.rb +++ b/test/controllers/way_controller_test.rb @@ -1,5 +1,5 @@ -require 'test_helper' -require 'way_controller' +require "test_helper" +require "way_controller" class WayControllerTest < ActionController::TestCase api_fixtures @@ -124,11 +124,9 @@ class WayControllerTest < ActionController::TestCase "" + "" put :create - # hope for success + # hope for failure assert_response :forbidden, - "way upload did not return success status" - # read id of created way and search for it - wayid = @response.body + "way upload did not return forbidden status" ## Now use a public user nid1 = current_nodes(:used_node_1).id @@ -371,8 +369,8 @@ class WayControllerTest < ActionController::TestCase # add an identical tag to the way tag_xml = XML::Node.new("tag") - tag_xml['k'] = current_way_tags(:t1).k - tag_xml['v'] = current_way_tags(:t1).v + tag_xml["k"] = current_way_tags(:t1).k + tag_xml["v"] = current_way_tags(:t1).v # add the tag into the existing xml way_xml = current_ways(:visible_way).to_xml @@ -390,8 +388,8 @@ class WayControllerTest < ActionController::TestCase # add an identical tag to the way tag_xml = XML::Node.new("tag") - tag_xml['k'] = current_way_tags(:t1).k - tag_xml['v'] = current_way_tags(:t1).v + tag_xml["k"] = current_way_tags(:t1).k + tag_xml["v"] = current_way_tags(:t1).v # add the tag into the existing xml way_xml = current_ways(:visible_way).to_xml @@ -414,8 +412,8 @@ class WayControllerTest < ActionController::TestCase # create duplicate tag tag_xml = XML::Node.new("tag") - tag_xml['k'] = "i_am_a_duplicate" - tag_xml['v'] = "foobar" + tag_xml["k"] = "i_am_a_duplicate" + tag_xml["v"] = "foobar" # add the tag into the existing xml way_xml = current_ways(:visible_way).to_xml @@ -435,8 +433,8 @@ class WayControllerTest < ActionController::TestCase # create duplicate tag tag_xml = XML::Node.new("tag") - tag_xml['k'] = "i_am_a_duplicate" - tag_xml['v'] = "foobar" + tag_xml["k"] = "i_am_a_duplicate" + tag_xml["v"] = "foobar" # add the tag into the existing xml way_xml = current_ways(:visible_way).to_xml @@ -521,7 +519,7 @@ class WayControllerTest < ActionController::TestCase ## # update the changeset_id of a node element def update_changeset(xml, changeset_id) - xml_attr_rewrite(xml, 'changeset', changeset_id) + xml_attr_rewrite(xml, "changeset", changeset_id) end ##