From 34b4d798f47275daca7fe38f7ac8d7664b68e44e Mon Sep 17 00:00:00 2001 From: Keith Lawrence Date: Tue, 14 Nov 2023 12:06:51 +0000 Subject: [PATCH] Revert "Add document content_id to atom feeds" --- app/presenters/entry_presenter.rb | 1 - app/views/finders/show.atom.builder | 1 - spec/presenters/entry_presenter_spec.rb | 12 ------------ 3 files changed, 14 deletions(-) diff --git a/app/presenters/entry_presenter.rb b/app/presenters/entry_presenter.rb index 87c5a6552..c255ddce9 100644 --- a/app/presenters/entry_presenter.rb +++ b/app/presenters/entry_presenter.rb @@ -1,7 +1,6 @@ class EntryPresenter delegate :title, :path, - :content_id, to: :entry WEBSITE_ROOT = Plek.new.website_root.gsub(/https?:\/\//, "") diff --git a/app/views/finders/show.atom.builder b/app/views/finders/show.atom.builder index 842dc75ac..e3f4f8d0d 100644 --- a/app/views/finders/show.atom.builder +++ b/app/views/finders/show.atom.builder @@ -11,7 +11,6 @@ atom_feed do |feed| feed.entry(result, id: result.tag(feed), url: absolute_url_for(result.path), updated: result.updated_at) do |entry| entry.title(result.title) entry.summary(result.summary, type: "html") - entry.content_id(result.content_id) end end end diff --git a/spec/presenters/entry_presenter_spec.rb b/spec/presenters/entry_presenter_spec.rb index 82232b307..e52d41ae8 100644 --- a/spec/presenters/entry_presenter_spec.rb +++ b/spec/presenters/entry_presenter_spec.rb @@ -35,16 +35,4 @@ expect(EntryPresenter.feed_ended_id(atom_feed_builder, "/path/to/content")).to eq("tag:www.test.gov.uk,2019:/path/to/content/feed-ended") end end - - # Note - this is a simple delegation and we wouldn't normally test, but - # it's important for email-alert-api's monitoring of medical alerts, so - # worth checking that it hasn't been accidentally removed. - describe "#content_id" do - let(:document) do - FactoryBot.build(:document, content_id: "AAAA-BBBB") - end - it "displays the content_id" do - expect(EntryPresenter.new(document, true).content_id).to eq("AAAA-BBBB") - end - end end