X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/be75a1504f3c9a49b6cbf4e83c35339f45390628..90ec90f13db277d992c40e6242bbd66a211c1987:/test/functional/changeset_controller_test.rb diff --git a/test/functional/changeset_controller_test.rb b/test/functional/changeset_controller_test.rb index 4c98fb36d..6465c894d 100644 --- a/test/functional/changeset_controller_test.rb +++ b/test/functional/changeset_controller_test.rb @@ -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 "" + + "" + + "" + 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.