From: Anton Khorev Date: Sun, 9 Feb 2025 15:18:25 +0000 (+0300) Subject: Test redacted element state after redaction action X-Git-Tag: live~227^2~10 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/d0c68c404147f36e92fdfe0d219c7e2bd6dfa6bb?ds=sidebyside;hp=--cc Test redacted element state after redaction action --- d0c68c404147f36e92fdfe0d219c7e2bd6dfa6bb diff --git a/test/controllers/api/old_nodes_controller_test.rb b/test/controllers/api/old_nodes_controller_test.rb index 6ffb8c7ca..2dea49d4c 100644 --- a/test/controllers/api/old_nodes_controller_test.rb +++ b/test/controllers/api/old_nodes_controller_test.rb @@ -228,7 +228,9 @@ module Api 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_predicate node_v3.reload, :redacted? # check moderator can still see the redacted data, when passing # the appropriate flag diff --git a/test/controllers/api/old_relations_controller_test.rb b/test/controllers/api/old_relations_controller_test.rb index 1e3953590..75fa5c77a 100644 --- a/test/controllers/api/old_relations_controller_test.rb +++ b/test/controllers/api/old_relations_controller_test.rb @@ -215,7 +215,9 @@ module Api 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_predicate relation_v3.reload, :redacted? # check moderator can still see the redacted data, when passing # the appropriate flag diff --git a/test/controllers/api/old_ways_controller_test.rb b/test/controllers/api/old_ways_controller_test.rb index 84c2cef3f..9464b6232 100644 --- a/test/controllers/api/old_ways_controller_test.rb +++ b/test/controllers/api/old_ways_controller_test.rb @@ -223,7 +223,9 @@ module Api 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_predicate way_v3.reload, :redacted? # check moderator can still see the redacted data, when passing # the appropriate flag