From 692d64f6f6ef401928f854b02955ebbe505ee124 Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Fri, 4 Jul 2025 18:53:35 +0300 Subject: [PATCH] Test that changeset create action creates one changeset --- test/controllers/api/changesets_controller_test.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/controllers/api/changesets_controller_test.rb b/test/controllers/api/changesets_controller_test.rb index c768c6707..66e20b5d6 100644 --- a/test/controllers/api/changesets_controller_test.rb +++ b/test/controllers/api/changesets_controller_test.rb @@ -289,9 +289,11 @@ module Api xml = "" \ "" \ "" - post api_changesets_path, :params => xml, :headers => auth_header - assert_response :success, "Creation of changeset did not return success status" + assert_difference "Changeset.count", 1 do + post api_changesets_path, :params => xml, :headers => auth_header + assert_response :success, "Creation of changeset did not return success status" + end newid = @response.body.to_i # check end time, should be an hour ahead of creation time -- 2.39.5