X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/c9d35839befe92d916425baa4daec7dd77ade929..f94340b9e886a7aeda536ed8ee5841edd3f8e45a:/test/controllers/changeset_controller_test.rb diff --git a/test/controllers/changeset_controller_test.rb b/test/controllers/changeset_controller_test.rb index 582d1ee5c..5b1dfdbe4 100644 --- a/test/controllers/changeset_controller_test.rb +++ b/test/controllers/changeset_controller_test.rb @@ -102,16 +102,16 @@ class ChangesetControllerTest < ActionController::TestCase basic_authorization users(:normal_user).email, "test" # Create the first user's changeset content "" + - "" + - "" + "" + + "" put :create assert_require_public_data basic_authorization users(:public_user).email, "test" # Create the first user's changeset content "" + - "" + - "" + "" + + "" put :create assert_response :success, "Creation of changeset did not return sucess status" @@ -527,8 +527,8 @@ EOF # create a temporary changeset content "" + - "" + - "" + "" + + "" assert_difference "Changeset.count", 1 do put :create end @@ -1102,8 +1102,8 @@ EOF basic_authorization users(:public_user).email, "test" content "" + - "" + - "" + "" + + "" put :create assert_response :success changeset_id = @response.body.to_i @@ -1114,8 +1114,8 @@ EOF diff.root = XML::Node.new "osmChange" modify = XML::Node.new "modify" xml_old_node = old_node.to_xml_node - xml_old_node["lat"] = (2.0).to_s - xml_old_node["lon"] = (2.0).to_s + xml_old_node["lat"] = 2.0.to_s + xml_old_node["lon"] = 2.0.to_s xml_old_node["changeset"] = changeset_id.to_s modify << xml_old_node diff.root << modify @@ -1140,8 +1140,8 @@ EOF basic_authorization users(:public_user).email, "test" content "" + - "" + - "" + "" + + "" put :create assert_response :success changeset_id = @response.body.to_i @@ -1225,8 +1225,8 @@ EOF # create a temporary changeset content "" + - "" + - "" + "" + + "" put :create assert_response :forbidden @@ -1235,8 +1235,8 @@ EOF # create a temporary changeset content "" + - "" + - "" + "" + + "" put :create assert_response :success changeset_id = @response.body.to_i @@ -1281,8 +1281,8 @@ EOF # create a temporary changeset content "" + - "" + - "" + "" + + "" put :create assert_response :success changeset_id = @response.body.to_i @@ -1340,8 +1340,8 @@ OSMFILE # create a temporary changeset content "" + - "" + - "" + "" + + "" put :create assert_response :success changeset_id = @response.body.to_i @@ -1574,7 +1574,7 @@ EOF get :query, :closed => "true" assert_response :success, "can't get changesets by closed-ness" - assert_changesets [3, 5, 6, 7, 8] + assert_changesets [3, 5, 6, 7, 8, 9] get :query, :closed => "true", :user => users(:normal_user).id assert_response :success, "can't get changesets by closed-ness and user" @@ -2317,8 +2317,8 @@ EOF # check the result of a list def check_list_result(changesets) changesets = changesets.where("num_changes > 0") - .order(:created_at => :desc) - .limit(20) + .order(:created_at => :desc) + .limit(20) assert changesets.size <= 20 assert_select "ol.changesets", :count => [changesets.size, 1].min do @@ -2334,8 +2334,8 @@ EOF # check the result of a feed def check_feed_result(changesets) changesets = changesets.where("num_changes > 0") - .order(:created_at => :desc) - .limit(20) + .order(:created_at => :desc) + .limit(20) assert changesets.size <= 20 assert_select "feed", :count => [changesets.size, 1].min do