diff --git a/app/models/afghanistan_links_presenter.rb b/app/models/afghanistan_links_presenter.rb deleted file mode 100644 index 888ea5a74..000000000 --- a/app/models/afghanistan_links_presenter.rb +++ /dev/null @@ -1,9 +0,0 @@ -module AfghanistanLinksPresenter - def afganistan_topical_event_payload - { topical_events: [afganistan_topical_event_content_id] } - end - - def afganistan_topical_event_content_id - "39084ee0-b77e-456b-93cb-f95a56f74b50" - end -end diff --git a/app/presenters/email_alert_presenter.rb b/app/presenters/email_alert_presenter.rb index efecb2626..803877333 100644 --- a/app/presenters/email_alert_presenter.rb +++ b/app/presenters/email_alert_presenter.rb @@ -1,6 +1,4 @@ class EmailAlertPresenter - include AfghanistanLinksPresenter - def self.present(edition) new(edition).present end @@ -47,12 +45,6 @@ def tags end def links - return base_links unless country.name == "Afghanistan" - - base_links.merge(afganistan_topical_event_payload) - end - - def base_links { countries: [content_id] } end diff --git a/spec/presenters/email_alert_presenter_afghanistan_spec.rb b/spec/presenters/email_alert_presenter_afghanistan_spec.rb deleted file mode 100644 index 4f300bcb0..000000000 --- a/spec/presenters/email_alert_presenter_afghanistan_spec.rb +++ /dev/null @@ -1,28 +0,0 @@ -RSpec.describe EmailAlertPresenter do - let(:edition) do - create( - :published_travel_advice_edition, - country_slug: "afghanistan", - title: "Afghanistan travel advice", - change_description: "Updated image of regions", - ) - end - - let(:links) do - { - countries: %w[5a292f20-a9b6-46ea-b35f-584f8b3d7392], - topical_events: %w[39084ee0-b77e-456b-93cb-f95a56f74b50], - } - end - - let(:email_alert) { described_class.present(edition) } - - context "Afghanistan travel advice is published" do - it "the topical event is added to the payload for email alert api" do - expect(email_alert["subject"]).to eq("Afghanistan travel advice") - expect(email_alert["tags"]).to eq({}) - expect(email_alert["document_type"]).to eq("travel_advice") - expect(email_alert["links"]).to eq(links) - end - end -end