From 0c97d19e43654f5d1035a07e1843488846bd89e6 Mon Sep 17 00:00:00 2001 From: Huw Diprose Date: Fri, 21 Jan 2022 18:11:50 +0000 Subject: [PATCH] Allow test helpers to find subscriber-list by content-id This is a feature that works and we use in single page notifications but it wasn't available in this test helper. --- lib/gds_api/test_helpers/email_alert_api.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/gds_api/test_helpers/email_alert_api.rb b/lib/gds_api/test_helpers/email_alert_api.rb index b3a8e4fc..609d9353 100644 --- a/lib/gds_api/test_helpers/email_alert_api.rb +++ b/lib/gds_api/test_helpers/email_alert_api.rb @@ -557,6 +557,7 @@ def build_subscriber_lists_url(attributes = nil) if attributes tags = attributes["tags"] links = attributes["links"] + content_id = attributes["content_id"] document_type = attributes["document_type"] email_document_supertype = attributes["email_document_supertype"] government_document_supertype = attributes["government_document_supertype"] @@ -566,6 +567,7 @@ def build_subscriber_lists_url(attributes = nil) params = {} params[:tags] = tags if tags params[:links] = links if links + params[:content_id] = content_id if content_id params[:document_type] = document_type if document_type params[:email_document_supertype] = email_document_supertype if email_document_supertype params[:government_document_supertype] = government_document_supertype if government_document_supertype