diff options
Diffstat (limited to 'spec/lib/feature_spec.rb')
-rw-r--r-- | spec/lib/feature_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/lib/feature_spec.rb b/spec/lib/feature_spec.rb index 127463a57e8..3d59b1f35a9 100644 --- a/spec/lib/feature_spec.rb +++ b/spec/lib/feature_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Feature do @@ -252,6 +254,22 @@ describe Feature do end end + describe '.remove' do + context 'for a non-persisted feature' do + it 'returns nil' do + expect(described_class.remove(:non_persisted_feature_flag)).to be_nil + end + end + + context 'for a persisted feature' do + it 'returns true' do + described_class.enable(:persisted_feature_flag) + + expect(described_class.remove(:persisted_feature_flag)).to be_truthy + end + end + end + describe Feature::Target do describe '#targets' do let(:project) { create(:project) } |