From 41f772b1d953541e896ae2ea3a97de04b6d28137 Mon Sep 17 00:00:00 2001 From: Keith Lawrence Date: Thu, 6 Feb 2025 13:28:53 +0000 Subject: [PATCH] Make /government/get-involved an exact route - The prefix route seems to be a hangover from when whitehall was rendering the Take Part items. These all now have their own content item, so anything under get-involved is either the get involved item or has its own route. - Both of the SpecialRoute instances are now exact path, so make that the default in rake task and test, and remove it from the instances. --- app/models/special_route.rb | 1 - lib/tasks/publishing_api.rake | 2 +- test/unit/lib/tasks/publishing_api_test.rb | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/models/special_route.rb b/app/models/special_route.rb index ff223a3046d..6af663107a0 100644 --- a/app/models/special_route.rb +++ b/app/models/special_route.rb @@ -7,7 +7,6 @@ def self.all title: "Government feed", description: "This route serves the feed of published content", rendering_app: Whitehall::RenderingApp::COLLECTIONS_FRONTEND, - type: "exact", }, { base_path: "/government/get-involved", diff --git a/lib/tasks/publishing_api.rake b/lib/tasks/publishing_api.rake index a73f122b6df..2640b755fce 100644 --- a/lib/tasks/publishing_api.rake +++ b/lib/tasks/publishing_api.rake @@ -14,8 +14,8 @@ namespace :publishing_api do format: "special_route", publishing_app: Whitehall::PublishingApp::WHITEHALL, update_type: "major", - type: "prefix", public_updated_at: Time.zone.now.iso8601, + type: "exact", }.merge(route), ) end diff --git a/test/unit/lib/tasks/publishing_api_test.rb b/test/unit/lib/tasks/publishing_api_test.rb index 89160f37554..2bd7726df51 100644 --- a/test/unit/lib/tasks/publishing_api_test.rb +++ b/test/unit/lib/tasks/publishing_api_test.rb @@ -16,7 +16,7 @@ class PublishingApiRake < ActiveSupport::TestCase format: "special_route", publishing_app: Whitehall::PublishingApp::WHITEHALL, update_type: "major", - type: "prefix", + type: "exact", public_updated_at: Time.zone.now.iso8601, }