Enable :profile_admin feature flag (#17187)
This makes profile fields available for all forems. There is a follow up task to remove the conditionals around this (and remove the flag).
This commit is contained in:
parent
0382b86755
commit
c8149e8e1a
2 changed files with 39 additions and 0 deletions
|
|
@ -0,0 +1,7 @@
|
|||
module DataUpdateScripts
|
||||
class EnableProfileAdminFeature
|
||||
def run
|
||||
FeatureFlag.enable(:profile_admin)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
require "rails_helper"
|
||||
require Rails.root.join(
|
||||
"lib/data_update_scripts/20220408154416_enable_profile_admin_feature.rb",
|
||||
)
|
||||
|
||||
describe DataUpdateScripts::EnableProfileAdminFeature do
|
||||
after do
|
||||
FeatureFlag.remove(:profile_admin)
|
||||
end
|
||||
|
||||
it "enables the :profile_admin flag" do
|
||||
expect do
|
||||
described_class.new.run
|
||||
end.to change { FeatureFlag.enabled?(:profile_admin) }.from(false).to(true)
|
||||
end
|
||||
|
||||
it "works if the flag is already available" do
|
||||
FeatureFlag.add(:profile_admin)
|
||||
|
||||
expect do
|
||||
described_class.new.run
|
||||
end.not_to change { FeatureFlag.exist?(:profile_admin) }
|
||||
end
|
||||
|
||||
it "works if the flag is already enabled" do
|
||||
FeatureFlag.enable(:profile_admin)
|
||||
|
||||
expect do
|
||||
described_class.new.run
|
||||
end.not_to change { FeatureFlag.enabled?(:profile_admin) }
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Reference in a new issue