Skip to content

Commit

Permalink
Merge pull request #5367 from alphagov/remove-brexit-cta-continued
Browse files Browse the repository at this point in the history
Retire BrexitCTA govspeak tag
  • Loading branch information
Laurent Curau committed Feb 20, 2020
2 parents 53d633e + ec543c3 commit 25895de
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 21 deletions.
7 changes: 0 additions & 7 deletions app/helpers/govspeak_helper.rb
Expand Up @@ -116,7 +116,6 @@ def bare_govspeak_to_html(govspeak, images = [], options = {}, &block)
govspeak = render_embedded_fractions(govspeak)
govspeak = set_classes_for_charts(govspeak)
govspeak = set_classes_for_sortable_tables(govspeak)
govspeak = convert_brexit_cta(govspeak)

markup_to_nokogiri_doc(govspeak, images)
.tap { |nokogiri_doc|
Expand Down Expand Up @@ -264,12 +263,6 @@ def govspeak_with_attachments_and_alt_format_information(govspeak, attachments =
end
end

def convert_brexit_cta(govspeak)
return govspeak if govspeak.blank?

govspeak.gsub(/\$BrexitCTA/, "")
end

def edition_body_with_attachments_and_alt_format_information(edition)
attachments = edition.allows_attachments? ? edition.attachments : []
govspeak_with_attachments_and_alt_format_information(edition.body, attachments, edition.alternative_format_contact_email)
Expand Down
8 changes: 0 additions & 8 deletions app/views/documents/_brexit_cta.text.erb

This file was deleted.

6 changes: 0 additions & 6 deletions test/unit/helpers/govspeak_helper_test.rb
Expand Up @@ -476,10 +476,4 @@ class GovspeakHelperTest < ActionView::TestCase
html = govspeak_with_attachments_to_html(body, attachments, "batman@wayne.technology")
assert html.include? ">batman@wayne.technology</a>"
end

test "does not render Brexit CTA govspeak" do
body = "$BrexitCTA\nSome other text"
output = govspeak_to_html(body)
assert_select_within_html output, ".govspeak", text: "Some other text"
end
end

0 comments on commit 25895de

Please sign in to comment.