Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove brexit checklist criteria #2005

Merged
merged 2 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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