Skip to content

Commit

Permalink
Merge pull request #2005 from alphagov/remove-brexit-checklist-criteria
Browse files Browse the repository at this point in the history
Remove brexit checklist criteria
  • Loading branch information
KludgeKML authored Sep 26, 2023
2 parents c687bce + a2509ae commit 2d433c5
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 38 deletions.
2 changes: 1 addition & 1 deletion docs/analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ report:csv_subscriber_lists["2020-11-05"]
SLUGS=living-in-spain,living-in-italy report:csv_subscriber_lists["2020-11-05"]

# or with tags containing a string
TAGS_PATTERN=brexit_checklist_criteria report:csv_subscriber_lists["2020-11-05"]
TAGS_PATTERN=country report:csv_subscriber_lists["2020-11-05"]

# or with links containing a string
LINKS_PATTERN=countries report:csv_subscriber_lists["2020-11-05"]
Expand Down
8 changes: 0 additions & 8 deletions lib/tasks/support.rake
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,4 @@ namespace :support do
end
end
end

desc "Destroy all Brexit checker subscriptions"
task destroy_all_brexit_checker_subscriptions: :environment do
brexit_subscriber_lists = SubscriberList.where("tags ->> 'brexit_checklist_criteria' IS NOT NULL")

puts "Destroying #{brexit_subscriber_lists.count} subscriber #{'list'.pluralize(brexit_subscriber_lists.count)}"
brexit_subscriber_lists.destroy_all
end
end
1 change: 0 additions & 1 deletion lib/valid_tags.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ class ValidTags
alert_type
appear_in_find_eu_exit_guidance_business_finder
assessment_date
brexit_checklist_criteria
business_activity
business_sizes
business_stages
Expand Down
28 changes: 0 additions & 28 deletions spec/lib/tasks/support_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,32 +80,4 @@
end
end
end

describe "destroy_all_brexit_checker_subscriptions" do
before do
Rake::Task["support:destroy_all_brexit_checker_subscriptions"].reenable
end

it "destroys all Brexit checker subscriptions" do
subscription = create :subscription, :brexit_checker
subscriber_list = subscription.subscriber_list

expect {
Rake::Task["support:destroy_all_brexit_checker_subscriptions"].invoke
}.to change { SubscriberList.exists?(subscriber_list.id) }.to(false)

expect(Subscription.exists?(subscription.id)).to be false
end

it "only destroys Brexit checker subscriptions" do
create :subscription, :brexit_checker
subscription = create :subscription

expect {
Rake::Task["support:destroy_all_brexit_checker_subscriptions"].invoke
}.to output("Destroying 1 subscriber list\n").to_stdout

expect(Subscription.exists?(subscription.id)).to be true
end
end
end

0 comments on commit 2d433c5

Please sign in to comment.