From f680bc8d5310964ba2d4c0ef3909f9ba4b7c419f Mon Sep 17 00:00:00 2001 From: Daniel Uber Date: Wed, 30 Mar 2022 14:51:45 -0500 Subject: [PATCH] Remove the connect feature flag (#17061) There's an existing data update to introduce the connect feature flag, and it's been disabled. However, since all the code relying on this is now gone, it makes sense to remove the flag. --- .../20220330191441_remove_connect_feature_flag.rb | 7 +++++++ .../remove_connect_feature_flag_spec.rb | 14 ++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 lib/data_update_scripts/20220330191441_remove_connect_feature_flag.rb create mode 100644 spec/lib/data_update_scripts/remove_connect_feature_flag_spec.rb diff --git a/lib/data_update_scripts/20220330191441_remove_connect_feature_flag.rb b/lib/data_update_scripts/20220330191441_remove_connect_feature_flag.rb new file mode 100644 index 000000000..af53a446b --- /dev/null +++ b/lib/data_update_scripts/20220330191441_remove_connect_feature_flag.rb @@ -0,0 +1,7 @@ +module DataUpdateScripts + class RemoveConnectFeatureFlag + def run + FeatureFlag.remove(:connect) + end + end +end diff --git a/spec/lib/data_update_scripts/remove_connect_feature_flag_spec.rb b/spec/lib/data_update_scripts/remove_connect_feature_flag_spec.rb new file mode 100644 index 000000000..c88f645a8 --- /dev/null +++ b/spec/lib/data_update_scripts/remove_connect_feature_flag_spec.rb @@ -0,0 +1,14 @@ +require "rails_helper" +require Rails.root.join( + "lib/data_update_scripts/20220330191441_remove_connect_feature_flag.rb", +) + +describe DataUpdateScripts::RemoveConnectFeatureFlag do + it "removes the connect feature flag" do + FeatureFlag.add(:connect) + + described_class.new.run + + expect(FeatureFlag.exist?(:connect)).to be false + end +end