Skip to content

Commit

Permalink
Use formatted name for worldwide organisations
Browse files Browse the repository at this point in the history
We are currently presenting the Worldwide Organisation's title in the
logo. This means there are no line breaks in the places specified by the
user.

Updating to use the formatted title, which the publisher would have
expected since they entered this in Whitehall.
  • Loading branch information
brucebolt committed Jan 2, 2024
1 parent e1ed723 commit e81e925
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/presenters/worldwide_organisation/branding.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def organisation_logo

sponsoring_organisation = sponsoring_organisations&.first
{
name: content_item["title"],
name: content_item.dig("details", "logo", "formatted_title").html_safe,
url: link_to_organisation ? worldwide_organisation.base_path : nil,
crest: sponsoring_organisation&.dig("details", "logo", "crest") || DEFAULT_ORGANISATION_LOGO,
brand: sponsoring_organisation&.dig("details", "brand") || DEFAULT_ORGANISATION_LOGO,
Expand Down
2 changes: 1 addition & 1 deletion test/integration/worldwide_organisation_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class WorldwideOrganisationTest < ActionDispatch::IntegrationTest
test "renders basic worldwide organisation page" do
setup_and_visit_content_item("worldwide_organisation")
assert_has_component_title(@content_item["title"])
assert_has_component_title("British Deputy High Commission\nHyderabad")
assert page.has_text?(@content_item["description"])
end

Expand Down

0 comments on commit e81e925

Please sign in to comment.