summaryrefslogtreecommitdiff
path: root/spec/lib/feature_spec.rb
diff options
context:
space:
mode:
authorAsh McKenzie <amckenzie@gitlab.com>2019-07-31 10:41:11 +1000
committerAsh McKenzie <amckenzie@gitlab.com>2019-08-01 08:29:14 +1000
commit31e419e945f8058be58487057bf77c338ca8f536 (patch)
treeec3d2a48935a6adef5cd1a897a3613d020bf3b76 /spec/lib/feature_spec.rb
parenta4e084461e6d3f5e0323f802c779e164fbd71abf (diff)
downloadgitlab-ce-65363-add-feature-remove.tar.gz
Add new Feature.remove method65363-add-feature-remove
Diffstat (limited to 'spec/lib/feature_spec.rb')
-rw-r--r--spec/lib/feature_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/lib/feature_spec.rb b/spec/lib/feature_spec.rb
index 185abacf8e7..3d59b1f35a9 100644
--- a/spec/lib/feature_spec.rb
+++ b/spec/lib/feature_spec.rb
@@ -254,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) }