Skip to content

Commit

Permalink
Remove web_isbn and print_meta_data_contact_address
Browse files Browse the repository at this point in the history
Trello - https://trello.com/c/w5dsqKuc/1381-remove-redundant-fields-for-whitehall-attachments-org-contact-and-web-isbn

These file types are redundant and should be removed. They are no longer being sent to the publishing api by whitehall
  • Loading branch information
JonathanHallam committed Feb 10, 2020
1 parent 1438f26 commit 04448ad
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 27 deletions.
8 changes: 0 additions & 8 deletions app/presenters/html_publication_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@ def isbn
content_item["details"]["isbn"]
end

def web_isbn
content_item["details"]["web_isbn"]
end

def print_meta_data_contact_address
content_item["details"]["print_meta_data_contact_address"]
end

def copyright_year
content_item["details"]["public_timestamp"].to_date.year if public_timestamp.present?
end
Expand Down
12 changes: 0 additions & 12 deletions app/views/content_items/html_publication/_print_meta_data.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,9 @@
<p>
This publication is available at <%= @content_item.full_path(request) %>
</p>
<% unless @content_item.print_meta_data_contact_address.blank? %>
<p>
Any enquiries regarding this publication should be sent to us at:<br/>
</p>
<%= simple_format(@content_item.print_meta_data_contact_address) %>
<% end %>

<% unless @content_item.isbn.blank? %>
<p>
Print ISBN: <%= @content_item.isbn %>
</p>
<% end %>

<% unless @content_item.web_isbn.blank? %>
<p>
Web ISBN: <%= @content_item.web_isbn %>
</p>
<% end %>
5 changes: 0 additions & 5 deletions test/integration/html_publication_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ class HtmlPublicationTest < ActionDispatch::IntegrationTest
assert page.find(".print-meta-data", visible: false)

assert page.has_no_text?("© Crown copyright #{@content_item['details']['public_timestamp'].to_date.year}")
assert page.has_no_text?("Any enquiries regarding this publication should be sent to us at:")
assert page.has_no_text?((@content_item["details"]["print_meta_data_contact_address"]).to_s)
assert page.has_no_text?("Print ISBN: #{@content_item['details']['isbn']}")
assert page.has_no_text?("Web ISBN: #{@content_item['details']['web_isbn']}")
end
end

Expand All @@ -44,8 +41,6 @@ class HtmlPublicationTest < ActionDispatch::IntegrationTest
assert page.find(".print-meta-data", visible: true)

assert page.has_text?("© Crown copyright #{@content_item['details']['public_timestamp'].to_date.year}")
assert page.has_text?("Any enquiries regarding this publication should be sent to us at:")
assert page.has_text?(:all, @content_item["details"]["print_meta_data_contact_address"].squish)
assert page.has_text?("Print ISBN: #{@content_item['details']['isbn']}")
end
end
Expand Down
2 changes: 0 additions & 2 deletions test/presenters/html_publication_presenter_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ def schema_name

test "presents the meta data info of a content item" do
assert_equal schema_item("print_with_meta_data")["details"]["isbn"], presented_item("print_with_meta_data").isbn
assert_equal schema_item("print_with_meta_data")["details"]["web_isbn"], presented_item("print_with_meta_data").web_isbn
assert_equal schema_item("print_with_meta_data")["details"]["print_meta_data_contact_address"], presented_item("print_with_meta_data").print_meta_data_contact_address
end

test "presents the last change date" do
Expand Down

0 comments on commit 04448ad

Please sign in to comment.