-
- # check moderator can now see the redacted data, when not
- # passing the aspecial flag
- get api_node_version_path(node_v1.node_id, node_v1.version), :headers => auth_header
- assert_response :success, "After unredaction, node should not be gone for moderator."
-
- # and when accessed via history
- get api_node_versions_path(node)
- assert_response :success, "Unredaction shouldn't have stopped history working."
- assert_select "osm node[id='#{node_v1.node_id}'][version='#{node_v1.version}']", 1,
- "node #{node_v1.node_id} version #{node_v1.version} should now be present in the history for moderators without passing flag."
-
- auth_header = bearer_authorization_header
-
- # check normal user can now see the redacted data
- get api_node_version_path(node_v1.node_id, node_v1.version), :headers => auth_header
- assert_response :success, "After unredaction, node should be visible to normal users."
-
- # and when accessed via history
- get api_node_versions_path(node)
- assert_response :success, "Unredaction shouldn't have stopped history working."
- assert_select "osm node[id='#{node_v1.node_id}'][version='#{node_v1.version}']", 1,
- "node #{node_v1.node_id} version #{node_v1.version} should now be present in the history for normal users without passing flag."