]> git.openstreetmap.org Git - rails.git/commitdiff
Test redacted element state after redaction action
authorAnton Khorev <tony29@yandex.ru>
Sun, 9 Feb 2025 15:18:25 +0000 (18:18 +0300)
committerAnton Khorev <tony29@yandex.ru>
Mon, 10 Feb 2025 23:08:28 +0000 (02:08 +0300)
test/controllers/api/old_nodes_controller_test.rb
test/controllers/api/old_relations_controller_test.rb
test/controllers/api/old_ways_controller_test.rb

index 6ffb8c7ca3731d3f27e69a65718c927d9b12fdd3..2dea49d4c55408c9977dbe82fc07d4f11f7ba03e 100644 (file)
@@ -228,7 +228,9 @@ module Api
       auth_header = bearer_authorization_header create(:moderator_user)
 
       do_redact_node(node_v3, create(:redaction), auth_header)
       auth_header = bearer_authorization_header create(:moderator_user)
 
       do_redact_node(node_v3, create(:redaction), auth_header)
+
       assert_response :success, "should be OK to redact old version as moderator."
       assert_response :success, "should be OK to redact old version as moderator."
+      assert_predicate node_v3.reload, :redacted?
 
       # check moderator can still see the redacted data, when passing
       # the appropriate flag
 
       # check moderator can still see the redacted data, when passing
       # the appropriate flag
index 1e3953590f85d7104825c5ae2313fab4830241de..75fa5c77ac874dae373a6634793a43844fdc19c7 100644 (file)
@@ -215,7 +215,9 @@ module Api
       auth_header = bearer_authorization_header create(:moderator_user)
 
       do_redact_relation(relation_v3, create(:redaction), auth_header)
       auth_header = bearer_authorization_header create(:moderator_user)
 
       do_redact_relation(relation_v3, create(:redaction), auth_header)
+
       assert_response :success, "should be OK to redact old version as moderator."
       assert_response :success, "should be OK to redact old version as moderator."
+      assert_predicate relation_v3.reload, :redacted?
 
       # check moderator can still see the redacted data, when passing
       # the appropriate flag
 
       # check moderator can still see the redacted data, when passing
       # the appropriate flag
index 84c2cef3fd58eaa828b13cdb8d51df4550ab0e2f..9464b6232476b90c2c6f68a268270970a261ffe9 100644 (file)
@@ -223,7 +223,9 @@ module Api
       auth_header = bearer_authorization_header create(:moderator_user)
 
       do_redact_way(way_v3, create(:redaction), auth_header)
       auth_header = bearer_authorization_header create(:moderator_user)
 
       do_redact_way(way_v3, create(:redaction), auth_header)
+
       assert_response :success, "should be OK to redact old version as moderator."
       assert_response :success, "should be OK to redact old version as moderator."
+      assert_predicate way_v3.reload, :redacted?
 
       # check moderator can still see the redacted data, when passing
       # the appropriate flag
 
       # check moderator can still see the redacted data, when passing
       # the appropriate flag