From 14ab0c08e3da8361f0bed9a42818cf952f61ae6c Mon Sep 17 00:00:00 2001 From: Keith Lawrence Date: Thu, 24 Aug 2023 11:28:54 +0100 Subject: [PATCH] Remove EmailSubscription states from pact helper --- spec/service_consumers/pact_helper.rb | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/spec/service_consumers/pact_helper.rb b/spec/service_consumers/pact_helper.rb index 86b4d435..abd2a4b6 100644 --- a/spec/service_consumers/pact_helper.rb +++ b/spec/service_consumers/pact_helper.rb @@ -15,21 +15,6 @@ def stub_cached_attributes(email_verified: true) email_verified:, ) end - - def stub_will_create_email_subscription(topic_slug, subscriber_list_id: "list-id") - stub_email_alert_api_has_subscriber_list_by_slug( - slug: topic_slug, - returned_attributes: { id: subscriber_list_id }, - ) - - stub_email_alert_api_creates_a_subscription( - subscriber_list_id:, - address: EMAIL_ADDRESS, - frequency: "daily", - returned_subscription_id: "subscription-id", - skip_confirmation_email: true, - ) - end end def oidc_user @@ -125,21 +110,12 @@ def url_encode(str) provider_state "there is a valid user session" do set_up do stub_cached_attributes - stub_will_create_email_subscription "wizard-news-topic-slug" # rubocop:disable RSpec/AnyInstance allow_any_instance_of(AccountSession).to receive(:set_remote_attributes) # rubocop:enable RSpec/AnyInstance end end - provider_state "there is a valid user session, with a 'wizard-news' email subscription" do - set_up do - stub_cached_attributes - stub_will_create_email_subscription "wizard-news-topic-slug" - FactoryBot.create(:email_subscription, name: "wizard-news", oidc_user_id: oidc_user.id) - end - end - provider_state "there is a valid user session, with an attribute called 'email'" do set_up do stub_cached_attributes