diff --git a/app/views/content_items/_body_with_related_links.html.erb b/app/views/content_items/_body_with_related_links.html.erb index f1442c309..86c804fa3 100644 --- a/app/views/content_items/_body_with_related_links.html.erb +++ b/app/views/content_items/_body_with_related_links.html.erb @@ -15,11 +15,10 @@ disable_youtube_expansions: true, rich_govspeak: true %> - <% #https://github.com/alphagov/government-frontend/pull/329#issuecomment-297681738 %> - <% if false && @content_item.last_updated %> -

- <%= t 'common.last_updated' %>: <%= @content_item.last_updated %> -

+ <% if @content_item.last_updated && @content_item.schema_name == "help_page" %> + <%= render "components/published-dates", { + last_updated: @content_item.last_updated + } %> <% end %> diff --git a/test/integration/help_page_test.rb b/test/integration/help_page_test.rb index 779af7b38..131286df4 100644 --- a/test/integration/help_page_test.rb +++ b/test/integration/help_page_test.rb @@ -3,9 +3,9 @@ class HelpPageTest < ActionDispatch::IntegrationTest test "renders title and body" do setup_and_visit_content_item('help_page') - assert page.has_text?(@content_item["title"]) - # assert page.has_text?("Last updated: 16 December 2014") + assert page.has_text?(@content_item["title"]) assert_has_component_govspeak(@content_item["details"]["body"].squish) + assert_has_published_dates(@content_item["last_updated"]) end end