From fd630be182fbaa04359d1d178ea2bbdbe0320b21 Mon Sep 17 00:00:00 2001 From: Bruce Bolt Date: Tue, 19 Mar 2024 15:31:08 +0000 Subject: [PATCH] Do not present non-edition links for Worldwide Offices In https://github.com/alphagov/whitehall/pull/8908, we switched Worldwide Offices to use edition links, so the draft version of the document can have different links to the parent. Now that all Worldwide Offices have been republished with edition links, we can remove the code to publish the non-edition links. --- app/presenters/publishing_api/worldwide_office_presenter.rb | 6 +----- .../publishing_api/worldwide_office_presenter_test.rb | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/app/presenters/publishing_api/worldwide_office_presenter.rb b/app/presenters/publishing_api/worldwide_office_presenter.rb index c661dc3ba2a..353b7aee9a7 100644 --- a/app/presenters/publishing_api/worldwide_office_presenter.rb +++ b/app/presenters/publishing_api/worldwide_office_presenter.rb @@ -41,11 +41,7 @@ def edition_links end def links - { - contact: [], - parent: [], - worldwide_organisation: [], - } + {} end private diff --git a/test/unit/app/presenters/publishing_api/worldwide_office_presenter_test.rb b/test/unit/app/presenters/publishing_api/worldwide_office_presenter_test.rb index 764c16a99a7..e26f33b181c 100644 --- a/test/unit/app/presenters/publishing_api/worldwide_office_presenter_test.rb +++ b/test/unit/app/presenters/publishing_api/worldwide_office_presenter_test.rb @@ -46,11 +46,7 @@ def present(...) }, } - expected_links = { - contact: [], - parent: [], - worldwide_organisation: [], - } + expected_links = {} presented_item = present(worldwide_office)