]> git.openstreetmap.org Git - rails.git/blobdiff - test/functional/changeset_controller_test.rb
reverting last change, which included posgres config specific things
[rails.git] / test / functional / changeset_controller_test.rb
index 4c98fb36d037fabb064c9aded73e2172e44fbc2e..6465c894de77d95a09008feb53daffb3460d3133 100644 (file)
@@ -37,7 +37,7 @@ class ChangesetControllerTest < ActionController::TestCase
       assert_equal Rational(1,24), duration , "initial idle timeout should be an hour (#{cs.created_at} -> #{cs.closed_at})"
     else
       # must be number of seconds...
-      assert_equal 3600.0, duration , "initial idle timeout should be an hour (#{cs.created_at} -> #{cs.closed_at})"
+      assert_equal 3600, duration.round, "initial idle timeout should be an hour (#{cs.created_at} -> #{cs.closed_at})"
     end
   end
   
@@ -240,6 +240,20 @@ EOF
     assert_equal false, Node.find(node.id).visible
   end
 
+  def test_repeated_changeset_create
+    30.times do
+      basic_authorization "test@openstreetmap.org", "test"
+    
+      # create a temporary changeset
+      content "<osm><changeset>" +
+        "<tag k='created_by' v='osm test suite checking changesets'/>" + 
+        "</changeset></osm>"
+      put :create
+      assert_response :success
+      changeset_id = @response.body.to_i
+    end
+  end
+
   ##
   # test that deleting stuff in a transaction doesn't bypass the checks
   # to ensure that used elements are not deleted.