Skip to content

Commit

Permalink
Merge pull request #907 from alphagov/enable-timestamp-on-help-page-f…
Browse files Browse the repository at this point in the history
…ormat

Add last_updated timestamp on help_page format
  • Loading branch information
deborahchua authored May 17, 2018
2 parents 7a33638 + b54c0f3 commit 1d68f46
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions app/views/content_items/_body_with_related_links.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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 %>
<p class="last-updated">
<%= t 'common.last_updated' %>: <%= @content_item.last_updated %>
</p>
<% if @content_item.last_updated && @content_item.schema_name == "help_page" %>
<%= render "components/published-dates", {
last_updated: @content_item.last_updated
} %>
<% end %>
</div>

Expand Down
4 changes: 2 additions & 2 deletions test/integration/help_page_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 1d68f46

Please sign in to comment.