Skip to content

Commit

Permalink
Remove Downing Street Briefings code
Browse files Browse the repository at this point in the history
We (GOV.UK) added custom functionality to the stack in order to support bespoke
needs for the Downing St. briefings page; Number 10 since cancelled
the briefings removing the need for the page; Thus there is now code
on GOV.UK that will never be executed. This commit removes said code.
  • Loading branch information
GDSNewt committed May 12, 2021
1 parent 63e402f commit 5cde722
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 149 deletions.
31 changes: 0 additions & 31 deletions app/assets/javascripts/modules/track-links.js

This file was deleted.

5 changes: 0 additions & 5 deletions app/controllers/content_items_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,16 +117,11 @@ def format_banner_links(links, type)
end

def content_item_template
return "briefing" if is_briefing?
return "guide_single" if @content_item.render_guide_as_single_page?

@content_item.schema_name
end

def is_briefing?
@content_item.content_id == "3d66e959-72d2-417d-89c1-00cd72eea30f"
end

def render_template
if @content_item.requesting_a_part? && !@content_item.has_valid_part?
redirect_to @content_item.base_path
Expand Down
28 changes: 0 additions & 28 deletions app/views/content_items/briefing.html.erb

This file was deleted.

66 changes: 0 additions & 66 deletions spec/javascripts/modules/track-links.js

This file was deleted.

19 changes: 0 additions & 19 deletions test/controllers/content_items_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -366,25 +366,6 @@ class ContentItemsControllerTest < ActionController::TestCase
assert_equal response.headers["Access-Control-Allow-Origin"], "*"
end

test "renders briefing view correctly" do
content_item = content_store_has_schema_example("news_article", "news_article")
content_item["content_id"] = "3d66e959-72d2-417d-89c1-00cd72eea30f"
stub_content_store_has_item(content_item["base_path"], content_item)

get :show, params: { path: path_for(content_item) }
assert_response :success
assert_select ".gem-c-title", content_item["title"]
assert_select ".gem-c-lead-paragraph", content_item["description"]
assert_select ".gem-c-govspeak"
assert_select ".gem-c-share-links"
assert_select ".gem-c-title .gem-c-title__context", false
assert_select ".metadata-logo-wrapper", false
assert_select ".app-c-figure", false
assert_select ".gem-c-contextual-sidebar", false
assert_select ".gem-c-metadata__definition", false
assert_select ".gem-c-contextual-footer", false
end

def path_for(content_item, locale = nil)
base_path = content_item["base_path"].sub(/^\//, "")
base_path.gsub!(/\.#{locale}$/, "") if locale
Expand Down

0 comments on commit 5cde722

Please sign in to comment.