]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/amf_controller_test.rb
Add a changeset to exercise that part of the contact rendering
[rails.git] / test / controllers / amf_controller_test.rb
index ec11b38e89bc33ec3ec7be3b4a8078aa1ac1c356..650bf1f8ef031a3b8e19808dd2b32a58e45abb42 100644 (file)
@@ -360,11 +360,11 @@ class AmfControllerTest < ActionController::TestCase
   # into the method args.
   def test_getway_old_invalid
     way_id = create(:way, :with_history, :version => 2).id
-    { "foo"  => "bar",
+    { "foo" => "bar",
       way_id => "not a date",
       way_id => "2009-03-25 00:00:00",                   # <- wrong format
       way_id => "0 Jan 2009 00:00:00",                   # <- invalid date
-      -1     => "1 Jan 2009 00:00:00" }.each do |id, t|  # <- invalid
+      -1 => "1 Jan 2009 00:00:00" }.each do |id, t| # <- invalid
       amf_content "getway_old", "/1", [id, t]
       post :amf_read
       assert_response :success
@@ -747,7 +747,7 @@ class AmfControllerTest < ActionController::TestCase
     assert_equal 5, result.size
     assert_equal 0, result[0], "expected to get the status ok from the amf"
     assert_equal 0, result[2], "The old id should be 0"
-    assert result[3] > 0, "The new id should be greater than 0"
+    assert result[3].positive?, "The new id should be greater than 0"
     assert_equal 1, result[4], "The new version should be 1"
 
     # Finally check that the node that was saved has saved the data correctly
@@ -784,7 +784,7 @@ class AmfControllerTest < ActionController::TestCase
     assert_equal 5, result.size
     assert_equal 0, result[0], "Expected to get the status ok in the amf"
     assert_equal 0, result[2], "The old id should be 0"
-    assert result[3] > 0, "The new id should be greater than 0"
+    assert result[3].positive?, "The new id should be greater than 0"
     assert_equal 1, result[4], "The new version should be 1"
 
     # Finally check that the node that was saved has saved the data correctly
@@ -831,7 +831,7 @@ class AmfControllerTest < ActionController::TestCase
     assert_equal 5, result.size
     assert_equal 0, result[0], "Expected to get the status ok in the amf"
     assert_equal 0, result[2], "The old id should be 0"
-    assert result[3] > 0, "The new id should be greater than 0"
+    assert result[3].positive?, "The new id should be greater than 0"
     assert_equal 1, result[4], "The new version should be 1"
 
     # Finally check that the node that was saved has saved the data correctly