From d71d6f540922c68d312977cbc35b00223849bcd7 Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Mon, 7 Jul 2025 07:30:39 +0300 Subject: [PATCH] Add extra members test for history table --- test/controllers/api/relations_controller_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/controllers/api/relations_controller_test.rb b/test/controllers/api/relations_controller_test.rb index 792dd33c4..b52274a07 100644 --- a/test/controllers/api/relations_controller_test.rb +++ b/test/controllers/api/relations_controller_test.rb @@ -689,6 +689,10 @@ module Api get api_relation_path(relation_id) assert_members_equal_response doc + # check the ordering in the history tables: + get api_relation_version_path(relation_id, 1) + assert_members_equal_response doc, "can't read back version 2 of the relation" + # insert a member at the front new_member = XML::Node.new "member" new_member["ref"] = node3.id.to_s @@ -750,6 +754,10 @@ module Api # get it back and check the ordering get api_relation_path(relation_id) assert_members_equal_response doc + + # check the ordering in the history tables: + get api_relation_version_path(relation_id, 1) + assert_members_equal_response doc, "can't read back version 1 of the relation" end ## -- 2.39.5