From 3b47a995d3ee1e91aaf0e1f798c0636299fdc959 Mon Sep 17 00:00:00 2001 From: James Chan Date: Thu, 13 Feb 2025 02:51:59 +0000 Subject: [PATCH] Rename instances of TitleAndContext/title_and_context to HeadingAndContext/heading_and_context Due to replacing the title component with the heading component, this naming seems to fit better. --- app/presenters/call_for_evidence_presenter.rb | 2 +- app/presenters/case_study_presenter.rb | 2 +- app/presenters/consultation_presenter.rb | 2 +- app/presenters/contact_presenter.rb | 4 ++-- .../{title_and_context.rb => heading_and_context.rb} | 4 ++-- app/presenters/corporate_information_page_presenter.rb | 4 ++-- app/presenters/detailed_guide_presenter.rb | 4 ++-- app/presenters/document_collection_presenter.rb | 2 +- app/presenters/fatality_notice_presenter.rb | 4 ++-- app/presenters/field_of_operation_presenter.rb | 4 ++-- app/presenters/fields_of_operation_presenter.rb | 4 ++-- app/presenters/news_article_presenter.rb | 2 +- app/presenters/specialist_document_presenter.rb | 4 ++-- app/presenters/speech_presenter.rb | 2 +- app/presenters/statistical_data_set_presenter.rb | 2 +- app/presenters/statistics_announcement_presenter.rb | 2 +- app/presenters/topical_event_about_page_presenter.rb | 4 ++-- app/presenters/working_group_presenter.rb | 4 ++-- app/views/content_items/call_for_evidence.html.erb | 4 ++-- app/views/content_items/case_study.html.erb | 2 +- app/views/content_items/consultation.html.erb | 4 ++-- app/views/content_items/contact.html.erb | 2 +- app/views/content_items/detailed_guide.html.erb | 4 ++-- app/views/content_items/document_collection.html.erb | 2 +- app/views/content_items/fatality_notice.html.erb | 2 +- app/views/content_items/field_of_operation.html.erb | 2 +- app/views/content_items/fields_of_operation.html.erb | 2 +- app/views/content_items/news_article.html.erb | 2 +- app/views/content_items/specialist_document.html.erb | 2 +- app/views/content_items/speech.html.erb | 2 +- app/views/content_items/statistics_announcement.html.erb | 2 +- app/views/content_items/working_group.html.erb | 2 +- app/views/shared/_title_and_translations.html.erb | 2 +- test/presenters/corporate_information_page_presenter_test.rb | 2 +- test/presenters/detailed_guide_presenter_test.rb | 2 +- test/presenters/field_of_operation_presenter_test.rb | 2 +- test/presenters/fields_of_operation_presenter_test.rb | 2 +- test/presenters/specialist_document_presenter_test.rb | 4 ++-- 38 files changed, 52 insertions(+), 52 deletions(-) rename app/presenters/content_item/{title_and_context.rb => heading_and_context.rb} (86%) diff --git a/app/presenters/call_for_evidence_presenter.rb b/app/presenters/call_for_evidence_presenter.rb index 9dc1ba8f0..a1c5b4264 100644 --- a/app/presenters/call_for_evidence_presenter.rb +++ b/app/presenters/call_for_evidence_presenter.rb @@ -6,7 +6,7 @@ class CallForEvidencePresenter < ContentItemPresenter include ContentItem::Political include ContentItem::Shareable include ContentItem::SinglePageNotificationButton - include ContentItem::TitleAndContext + include ContentItem::HeadingAndContext def opening_date_time content_item["details"]["opening_date"] diff --git a/app/presenters/case_study_presenter.rb b/app/presenters/case_study_presenter.rb index 4a13af58e..33d179653 100644 --- a/app/presenters/case_study_presenter.rb +++ b/app/presenters/case_study_presenter.rb @@ -1,7 +1,7 @@ class CaseStudyPresenter < ContentItemPresenter include ContentItem::Body include ContentItem::Metadata - include ContentItem::TitleAndContext + include ContentItem::HeadingAndContext def image content_item["details"]["image"] diff --git a/app/presenters/consultation_presenter.rb b/app/presenters/consultation_presenter.rb index af31a53f6..9916efd24 100644 --- a/app/presenters/consultation_presenter.rb +++ b/app/presenters/consultation_presenter.rb @@ -6,7 +6,7 @@ class ConsultationPresenter < ContentItemPresenter include ContentItem::Political include ContentItem::Shareable include ContentItem::SinglePageNotificationButton - include ContentItem::TitleAndContext + include ContentItem::HeadingAndContext def opening_date_time content_item["details"]["opening_date"] diff --git a/app/presenters/contact_presenter.rb b/app/presenters/contact_presenter.rb index ad6aa634e..ca39cc769 100644 --- a/app/presenters/contact_presenter.rb +++ b/app/presenters/contact_presenter.rb @@ -1,8 +1,8 @@ class ContactPresenter < ContentItemPresenter - include ContentItem::TitleAndContext + include ContentItem::HeadingAndContext include ContentItem::ContactDetails - def title_and_context + def heading_and_context super.tap do |t| t[:font_size] = "xl" t.delete(:context) diff --git a/app/presenters/content_item/title_and_context.rb b/app/presenters/content_item/heading_and_context.rb similarity index 86% rename from app/presenters/content_item/title_and_context.rb rename to app/presenters/content_item/heading_and_context.rb index a9444a608..6ffdbab06 100644 --- a/app/presenters/content_item/title_and_context.rb +++ b/app/presenters/content_item/heading_and_context.rb @@ -1,6 +1,6 @@ module ContentItem - module TitleAndContext - def title_and_context + module HeadingAndContext + def heading_and_context { text: title, context: I18n.t("content_item.schema_name.#{document_type}", count: 1), diff --git a/app/presenters/corporate_information_page_presenter.rb b/app/presenters/corporate_information_page_presenter.rb index 173b0d109..4ec3a542f 100644 --- a/app/presenters/corporate_information_page_presenter.rb +++ b/app/presenters/corporate_information_page_presenter.rb @@ -1,7 +1,7 @@ class CorporateInformationPagePresenter < ContentItemPresenter include ContentItem::Body include ContentItem::ContentsList - include ContentItem::TitleAndContext + include ContentItem::HeadingAndContext include ContentItem::OrganisationBranding include ContentItem::CorporateInformationGroups @@ -11,7 +11,7 @@ def page_title page_title end - def title_and_context + def heading_and_context super.tap do |t| t[:font_size] = "xl" t.delete(:context) diff --git a/app/presenters/detailed_guide_presenter.rb b/app/presenters/detailed_guide_presenter.rb index 24125ec06..6d3b0be7e 100644 --- a/app/presenters/detailed_guide_presenter.rb +++ b/app/presenters/detailed_guide_presenter.rb @@ -4,10 +4,10 @@ class DetailedGuidePresenter < ContentItemPresenter include ContentItem::Metadata include ContentItem::NationalApplicability include ContentItem::Political - include ContentItem::TitleAndContext + include ContentItem::HeadingAndContext include ContentItem::SinglePageNotificationButton - def title_and_context + def heading_and_context super.tap do |t| t[:context] = I18n.t("content_item.schema_name.guidance", count: 1) end diff --git a/app/presenters/document_collection_presenter.rb b/app/presenters/document_collection_presenter.rb index 7fc71b85e..a7d1d6f65 100644 --- a/app/presenters/document_collection_presenter.rb +++ b/app/presenters/document_collection_presenter.rb @@ -2,7 +2,7 @@ class DocumentCollectionPresenter < ContentItemPresenter include ContentItem::Body include ContentItem::Metadata include ContentItem::Political - include ContentItem::TitleAndContext + include ContentItem::HeadingAndContext include ContentItem::ContentsList include ContentItem::SinglePageNotificationButton include DocumentCollection::SignupLink diff --git a/app/presenters/fatality_notice_presenter.rb b/app/presenters/fatality_notice_presenter.rb index c307f9a92..b36d595fd 100644 --- a/app/presenters/fatality_notice_presenter.rb +++ b/app/presenters/fatality_notice_presenter.rb @@ -1,6 +1,6 @@ class FatalityNoticePresenter < ContentItemPresenter include ContentItem::Body - include ContentItem::TitleAndContext + include ContentItem::HeadingAndContext include ContentItem::Metadata def field_of_operation @@ -23,7 +23,7 @@ def important_metadata end end - def title_and_context + def heading_and_context super.tap do |t| if field_of_operation t[:context] = I18n.t("fatality_notice.operations_in", location: field_of_operation.try(:title)) diff --git a/app/presenters/field_of_operation_presenter.rb b/app/presenters/field_of_operation_presenter.rb index 96ed2f1f7..4923fa4fb 100644 --- a/app/presenters/field_of_operation_presenter.rb +++ b/app/presenters/field_of_operation_presenter.rb @@ -1,9 +1,9 @@ class FieldOfOperationPresenter < ContentItemPresenter - include ContentItem::TitleAndContext + include ContentItem::HeadingAndContext FatalityNotice = Struct.new(:roll_call_introduction, :casualties, :title, :base_path) - def title_and_context + def heading_and_context super.tap do |t| t[:context] = I18n.t("field_of_operation.context") t[:text] = "#{I18n.t('field_of_operation.title')} #{@content_item['title']}" diff --git a/app/presenters/fields_of_operation_presenter.rb b/app/presenters/fields_of_operation_presenter.rb index 7b7dc109c..b670725f5 100644 --- a/app/presenters/fields_of_operation_presenter.rb +++ b/app/presenters/fields_of_operation_presenter.rb @@ -1,11 +1,11 @@ class FieldsOfOperationPresenter < ContentItemPresenter - include ContentItem::TitleAndContext + include ContentItem::HeadingAndContext def fields_of_operation content_item.dig("links", "fields_of_operation").map { |field| [field["title"], field["base_path"]] } end - def title_and_context + def heading_and_context super.tap do |t| t[:context] = I18n.t("fields_of_operation.context") t[:font_size] = "xl" diff --git a/app/presenters/news_article_presenter.rb b/app/presenters/news_article_presenter.rb index bfb2e2eb7..b279aa1b7 100644 --- a/app/presenters/news_article_presenter.rb +++ b/app/presenters/news_article_presenter.rb @@ -4,7 +4,7 @@ class NewsArticlePresenter < ContentItemPresenter include ContentItem::Linkable include ContentItem::Updatable include ContentItem::Shareable - include ContentItem::TitleAndContext + include ContentItem::HeadingAndContext include ContentItem::Metadata include ContentItem::NewsImage end diff --git a/app/presenters/specialist_document_presenter.rb b/app/presenters/specialist_document_presenter.rb index 6e54e371f..eb2fb895d 100644 --- a/app/presenters/specialist_document_presenter.rb +++ b/app/presenters/specialist_document_presenter.rb @@ -2,12 +2,12 @@ class SpecialistDocumentPresenter < ContentItemPresenter include ContentItem::Body include ContentItem::Updatable include ContentItem::Linkable - include ContentItem::TitleAndContext + include ContentItem::HeadingAndContext include ContentItem::Metadata include TypographyHelper include ContentItem::ContentsList - def title_and_context + def heading_and_context super.tap do |t| t.delete(:context) end diff --git a/app/presenters/speech_presenter.rb b/app/presenters/speech_presenter.rb index 7d702f5c8..5970a2aa4 100644 --- a/app/presenters/speech_presenter.rb +++ b/app/presenters/speech_presenter.rb @@ -3,7 +3,7 @@ class SpeechPresenter < ContentItemPresenter include ContentItem::Linkable include ContentItem::Political include ContentItem::Updatable - include ContentItem::TitleAndContext + include ContentItem::HeadingAndContext include ContentItem::Metadata include ContentItem::NewsImage diff --git a/app/presenters/statistical_data_set_presenter.rb b/app/presenters/statistical_data_set_presenter.rb index 824689207..840ba842d 100644 --- a/app/presenters/statistical_data_set_presenter.rb +++ b/app/presenters/statistical_data_set_presenter.rb @@ -1,7 +1,7 @@ class StatisticalDataSetPresenter < ContentItemPresenter include ContentItem::Body include ContentItem::ContentsList - include ContentItem::TitleAndContext + include ContentItem::HeadingAndContext include ContentItem::Political include ContentItem::Metadata end diff --git a/app/presenters/statistics_announcement_presenter.rb b/app/presenters/statistics_announcement_presenter.rb index 1b22178b4..ac0013d2e 100644 --- a/app/presenters/statistics_announcement_presenter.rb +++ b/app/presenters/statistics_announcement_presenter.rb @@ -1,7 +1,7 @@ class StatisticsAnnouncementPresenter < ContentItemPresenter include ContentItem::Metadata include ContentItem::NationalStatisticsLogo - include ContentItem::TitleAndContext + include ContentItem::HeadingAndContext include StatisticsAnnouncementHelper FORTHCOMING_NOTICE = I18n.t("statistics_announcement.forthcoming").freeze diff --git a/app/presenters/topical_event_about_page_presenter.rb b/app/presenters/topical_event_about_page_presenter.rb index 2a4b53c0b..f46a663e2 100644 --- a/app/presenters/topical_event_about_page_presenter.rb +++ b/app/presenters/topical_event_about_page_presenter.rb @@ -1,9 +1,9 @@ class TopicalEventAboutPagePresenter < ContentItemPresenter include ContentItem::Body include ContentItem::ContentsList - include ContentItem::TitleAndContext + include ContentItem::HeadingAndContext - def title_and_context + def heading_and_context super.tap do |t| t[:font_size] = "xl" t.delete(:context) diff --git a/app/presenters/working_group_presenter.rb b/app/presenters/working_group_presenter.rb index 73d6894d1..ee4cdb378 100644 --- a/app/presenters/working_group_presenter.rb +++ b/app/presenters/working_group_presenter.rb @@ -1,7 +1,7 @@ class WorkingGroupPresenter < ContentItemPresenter include ContentItem::Body include ContentItem::ContentsList - include ContentItem::TitleAndContext + include ContentItem::HeadingAndContext def email content_item["details"]["email"] @@ -19,7 +19,7 @@ def policies content_item["links"]["policies"] end - def title_and_context + def heading_and_context super.tap do |t| t[:font_size] = "xl" t.delete(:context) diff --git a/app/views/content_items/call_for_evidence.html.erb b/app/views/content_items/call_for_evidence.html.erb index 14631c895..d970761fb 100644 --- a/app/views/content_items/call_for_evidence.html.erb +++ b/app/views/content_items/call_for_evidence.html.erb @@ -4,11 +4,11 @@ ) %> <% end %> -<%= render 'shared/email_subscribe_unsubscribe_flash', { title: @content_item.title_and_context[:title] } %> +<%= render 'shared/email_subscribe_unsubscribe_flash', { title: @content_item.heading_and_context[:title] } %>
- <%= render 'govuk_publishing_components/components/heading', @content_item.title_and_context %> + <%= render 'govuk_publishing_components/components/heading', @content_item.heading_and_context %>
<%= render 'shared/translations' %>
diff --git a/app/views/content_items/case_study.html.erb b/app/views/content_items/case_study.html.erb index d73320014..52a7414e3 100644 --- a/app/views/content_items/case_study.html.erb +++ b/app/views/content_items/case_study.html.erb @@ -6,7 +6,7 @@
- <%= render 'govuk_publishing_components/components/heading', @content_item.title_and_context %> + <%= render 'govuk_publishing_components/components/heading', @content_item.heading_and_context %>
<%= render 'shared/translations' %>
diff --git a/app/views/content_items/consultation.html.erb b/app/views/content_items/consultation.html.erb index 6fea62436..57c96d611 100644 --- a/app/views/content_items/consultation.html.erb +++ b/app/views/content_items/consultation.html.erb @@ -4,11 +4,11 @@ ) %> <% end %> -<%= render 'shared/email_subscribe_unsubscribe_flash', { title: @content_item.title_and_context[:title] } %> +<%= render 'shared/email_subscribe_unsubscribe_flash', { title: @content_item.heading_and_context[:title] } %>
- <%= render 'govuk_publishing_components/components/heading', @content_item.title_and_context %> + <%= render 'govuk_publishing_components/components/heading', @content_item.heading_and_context %>
<%= render 'shared/translations' %>
diff --git a/app/views/content_items/contact.html.erb b/app/views/content_items/contact.html.erb index cf9f5c773..bb8f0871c 100644 --- a/app/views/content_items/contact.html.erb +++ b/app/views/content_items/contact.html.erb @@ -8,7 +8,7 @@
- <%= render 'govuk_publishing_components/components/heading', @content_item.title_and_context %> + <%= render 'govuk_publishing_components/components/heading', @content_item.heading_and_context %>
diff --git a/app/views/content_items/detailed_guide.html.erb b/app/views/content_items/detailed_guide.html.erb index aa27feb21..f99a9fb4d 100644 --- a/app/views/content_items/detailed_guide.html.erb +++ b/app/views/content_items/detailed_guide.html.erb @@ -4,11 +4,11 @@ ) %> <% end %> -<%= render 'shared/email_subscribe_unsubscribe_flash', { title: @content_item.title_and_context[:title] } %> +<%= render 'shared/email_subscribe_unsubscribe_flash', { title: @content_item.heading_and_context[:title] } %>
- <%= render 'govuk_publishing_components/components/heading', @content_item.title_and_context %> + <%= render 'govuk_publishing_components/components/heading', @content_item.heading_and_context %>
<%= render 'shared/translations' %>
diff --git a/app/views/content_items/document_collection.html.erb b/app/views/content_items/document_collection.html.erb index 5198bc3f0..1e6d57c2a 100644 --- a/app/views/content_items/document_collection.html.erb +++ b/app/views/content_items/document_collection.html.erb @@ -4,7 +4,7 @@ ) %> <% end %> -<%= render 'shared/email_subscribe_unsubscribe_flash', { title: @content_item.title_and_context[:title] } %> +<%= render 'shared/email_subscribe_unsubscribe_flash', { title: @content_item.heading_and_context[:title] } %>
diff --git a/app/views/content_items/fatality_notice.html.erb b/app/views/content_items/fatality_notice.html.erb index 9f9f3d562..223e842dc 100644 --- a/app/views/content_items/fatality_notice.html.erb +++ b/app/views/content_items/fatality_notice.html.erb @@ -6,7 +6,7 @@
- <%= render 'govuk_publishing_components/components/heading', @content_item.title_and_context %> + <%= render 'govuk_publishing_components/components/heading', @content_item.heading_and_context %>
<%= render 'shared/translations' %>
diff --git a/app/views/content_items/field_of_operation.html.erb b/app/views/content_items/field_of_operation.html.erb index e7c1ddcfb..34d7c2b0d 100644 --- a/app/views/content_items/field_of_operation.html.erb +++ b/app/views/content_items/field_of_operation.html.erb @@ -1,7 +1,7 @@
- <%= render "govuk_publishing_components/components/heading", @content_item.title_and_context %> + <%= render "govuk_publishing_components/components/heading", @content_item.heading_and_context %>
<%= render "govuk_publishing_components/components/organisation_logo", { diff --git a/app/views/content_items/fields_of_operation.html.erb b/app/views/content_items/fields_of_operation.html.erb index 8d7d49924..5ae713f53 100644 --- a/app/views/content_items/fields_of_operation.html.erb +++ b/app/views/content_items/fields_of_operation.html.erb @@ -1,6 +1,6 @@
- <%= render 'govuk_publishing_components/components/heading', @content_item.title_and_context %> + <%= render 'govuk_publishing_components/components/heading', @content_item.heading_and_context %>
diff --git a/app/views/content_items/news_article.html.erb b/app/views/content_items/news_article.html.erb index 167814074..1fab63a7a 100644 --- a/app/views/content_items/news_article.html.erb +++ b/app/views/content_items/news_article.html.erb @@ -6,7 +6,7 @@
- <%= render 'govuk_publishing_components/components/heading', @content_item.title_and_context %> + <%= render 'govuk_publishing_components/components/heading', @content_item.heading_and_context %>
<%= render 'shared/translations' %>
diff --git a/app/views/content_items/specialist_document.html.erb b/app/views/content_items/specialist_document.html.erb index d13619279..3abdb4f7f 100644 --- a/app/views/content_items/specialist_document.html.erb +++ b/app/views/content_items/specialist_document.html.erb @@ -9,7 +9,7 @@
- <%= render 'govuk_publishing_components/components/heading', @content_item.title_and_context %> + <%= render 'govuk_publishing_components/components/heading', @content_item.heading_and_context %>
<%= render 'shared/translations' %>
diff --git a/app/views/content_items/speech.html.erb b/app/views/content_items/speech.html.erb index 3440c6e52..02073f29b 100644 --- a/app/views/content_items/speech.html.erb +++ b/app/views/content_items/speech.html.erb @@ -6,7 +6,7 @@
- <%= render 'govuk_publishing_components/components/heading', @content_item.title_and_context %> + <%= render 'govuk_publishing_components/components/heading', @content_item.heading_and_context %>
<%= render 'shared/translations' %>
diff --git a/app/views/content_items/statistics_announcement.html.erb b/app/views/content_items/statistics_announcement.html.erb index f28705b12..32bb8fc14 100644 --- a/app/views/content_items/statistics_announcement.html.erb +++ b/app/views/content_items/statistics_announcement.html.erb @@ -6,7 +6,7 @@
- <%= render 'govuk_publishing_components/components/heading', @content_item.title_and_context %> + <%= render 'govuk_publishing_components/components/heading', @content_item.heading_and_context %> <%= render 'govuk_publishing_components/components/lead_paragraph', text: @content_item.description %>
diff --git a/app/views/content_items/working_group.html.erb b/app/views/content_items/working_group.html.erb index 60abd0d22..d64263ffb 100644 --- a/app/views/content_items/working_group.html.erb +++ b/app/views/content_items/working_group.html.erb @@ -22,7 +22,7 @@
- <%= render 'govuk_publishing_components/components/heading', @content_item.title_and_context %> + <%= render 'govuk_publishing_components/components/heading', @content_item.heading_and_context %>
<%= render 'shared/translations' %>
diff --git a/app/views/shared/_title_and_translations.html.erb b/app/views/shared/_title_and_translations.html.erb index dcaf18e8e..a7d3f1849 100644 --- a/app/views/shared/_title_and_translations.html.erb +++ b/app/views/shared/_title_and_translations.html.erb @@ -1,6 +1,6 @@
- <%= render 'govuk_publishing_components/components/heading', @content_item.title_and_context %> + <%= render 'govuk_publishing_components/components/heading', @content_item.heading_and_context %>
<%= render 'shared/translations' %>
diff --git a/test/presenters/corporate_information_page_presenter_test.rb b/test/presenters/corporate_information_page_presenter_test.rb index 9ac696b6a..77574612c 100644 --- a/test/presenters/corporate_information_page_presenter_test.rb +++ b/test/presenters/corporate_information_page_presenter_test.rb @@ -32,7 +32,7 @@ def schema_name assert presented_item.is_a?(ContentItem::HeadingAndContext) heading_component_params = { text: "About us", context_locale: :en, heading_level: 1, margin_bottom: 8, font_size: "xl" } - assert_equal heading_component_params, presented_item.title_and_context + assert_equal heading_component_params, presented_item.heading_and_context end test "has organisation branding" do diff --git a/test/presenters/detailed_guide_presenter_test.rb b/test/presenters/detailed_guide_presenter_test.rb index 26d384318..238b6bca0 100644 --- a/test/presenters/detailed_guide_presenter_test.rb +++ b/test/presenters/detailed_guide_presenter_test.rb @@ -70,7 +70,7 @@ def schema_name test "context in title is overridden to display as guidance" do I18n.with_locale("fr") do - assert_equal I18n.t("content_item.schema_name.guidance", count: 1), presented_item.title_and_context[:context] + assert_equal I18n.t("content_item.schema_name.guidance", count: 1), presented_item.heading_and_context[:context] end end diff --git a/test/presenters/field_of_operation_presenter_test.rb b/test/presenters/field_of_operation_presenter_test.rb index bf98fd0c9..b594ebb93 100644 --- a/test/presenters/field_of_operation_presenter_test.rb +++ b/test/presenters/field_of_operation_presenter_test.rb @@ -14,7 +14,7 @@ def schema_name margin_bottom: 8, font_size: "xl", } - assert_equal expected_heading_and_context, presented_item.title_and_context + assert_equal expected_heading_and_context, presented_item.heading_and_context end test "it presents a description" do diff --git a/test/presenters/fields_of_operation_presenter_test.rb b/test/presenters/fields_of_operation_presenter_test.rb index bdb917b4c..4ea30c76a 100644 --- a/test/presenters/fields_of_operation_presenter_test.rb +++ b/test/presenters/fields_of_operation_presenter_test.rb @@ -15,7 +15,7 @@ def schema_name font_size: "xl", } - assert_equal heading_component_params, presented_item.title_and_context + assert_equal heading_component_params, presented_item.heading_and_context end test "presents the fields of operation" do diff --git a/test/presenters/specialist_document_presenter_test.rb b/test/presenters/specialist_document_presenter_test.rb index 6cad6d7e1..aac3f0d25 100644 --- a/test/presenters/specialist_document_presenter_test.rb +++ b/test/presenters/specialist_document_presenter_test.rb @@ -92,7 +92,7 @@ class PresentedSpecialistDocument < SpecialistDocumentTestCase end test "has heading without context" do - assert presented_item("aaib-reports").is_a?(ContentItem::TitleAndContext) + assert presented_item("aaib-reports").is_a?(ContentItem::HeadingAndContext) heading_component_params = { text: schema_item("aaib-reports")["title"], context_locale: nil, @@ -101,7 +101,7 @@ class PresentedSpecialistDocument < SpecialistDocumentTestCase font_size: "l", } - assert_equal heading_component_params, presented_item("aaib-reports").title_and_context + assert_equal heading_component_params, presented_item("aaib-reports").heading_and_context end test "should not present continuation_link" do