]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/api/ways_controller_test.rb
Fix new rubocop warnings
[rails.git] / test / controllers / api / ways_controller_test.rb
index 672a282a9659e908f2508e008c2c30bed430f477..2bed0e5d67e7644ad1165471c55c53501cbef515 100644 (file)
@@ -180,8 +180,7 @@ module Api
       assert_not_nil checkway,
                      "uploaded way not found in data base after upload"
       # compare values
-      assert_equal checkway.nds.length, 2,
-                   "saved way does not contain exactly one node"
+      assert_equal(2, checkway.nds.length, "saved way does not contain exactly one node")
       assert_equal checkway.nds[0], node1.id,
                    "saved way does not contain the right node on pos 0"
       assert_equal checkway.nds[1], node2.id,
@@ -380,8 +379,7 @@ module Api
       # check the returned value - should be the new version number
       # valid delete should return the new version number, which should
       # be greater than the old version number
-      assert @response.body.to_i > way.version,
-             "delete request should return a new version number for way"
+      assert_operator @response.body.to_i, :>, way.version, "delete request should return a new version number for way"
 
       # this won't work since the way is already deleted
       xml = xml_for_way(deleted_way)
@@ -755,6 +753,8 @@ module Api
       end
     end
 
+    private
+
     ##
     # update the changeset_id of a way element
     def update_changeset(xml, changeset_id)