Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/pages/stores/local_store_spec.rb')
-rw-r--r--spec/lib/gitlab/pages/stores/local_store_spec.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/lib/gitlab/pages/stores/local_store_spec.rb b/spec/lib/gitlab/pages/stores/local_store_spec.rb
new file mode 100644
index 00000000000..adab81b2589
--- /dev/null
+++ b/spec/lib/gitlab/pages/stores/local_store_spec.rb
@@ -0,0 +1,25 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe Gitlab::Pages::Stores::LocalStore do
+ describe '#enabled' do
+ let(:local_store) { double(enabled: true) }
+
+ subject(:local_store_enabled) { described_class.new(local_store).enabled }
+
+ context 'when the pages_update_legacy_storage FF is disabled' do
+ before do
+ stub_feature_flags(pages_update_legacy_storage: false)
+ end
+
+ it { is_expected.to be_falsey }
+ end
+
+ context 'when the pages_update_legacy_storage FF is enabled' do
+ it 'is equal to the original value' do
+ expect(local_store_enabled).to eq(local_store.enabled)
+ end
+ end
+ end
+end