summaryrefslogtreecommitdiff
path: root/spec/lib/feature/gitaly_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-12 12:09:01 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-12 12:09:01 +0000
commitbd497e352ebd279536ae11855871162e82a3f88c (patch)
tree2241444d4be33e199d7011b872713071a8f8cd41 /spec/lib/feature/gitaly_spec.rb
parent0388886f9439fa93efea29a159522aec5643f7c8 (diff)
downloadgitlab-ce-bd497e352ebd279536ae11855871162e82a3f88c.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/feature/gitaly_spec.rb')
-rw-r--r--spec/lib/feature/gitaly_spec.rb18
1 files changed, 6 insertions, 12 deletions
diff --git a/spec/lib/feature/gitaly_spec.rb b/spec/lib/feature/gitaly_spec.rb
index 4e07acf9c1a..afb522d05e1 100644
--- a/spec/lib/feature/gitaly_spec.rb
+++ b/spec/lib/feature/gitaly_spec.rb
@@ -5,10 +5,6 @@ require 'spec_helper'
describe Feature::Gitaly do
let(:feature_flag) { "mep_mep" }
- before do
- stub_const("#{described_class}::SERVER_FEATURE_FLAGS", [feature_flag])
- end
-
describe ".enabled?" do
context 'when the gate is closed' do
before do
@@ -28,15 +24,13 @@ describe Feature::Gitaly do
end
describe ".server_feature_flags" do
- context 'when one flag is disabled' do
- before do
- stub_feature_flags(gitaly_mep_mep: false)
- end
+ before do
+ allow(Feature).to receive(:persisted_names).and_return(%w[gitaly_mep_mep foo])
+ end
- subject { described_class.server_feature_flags }
+ subject { described_class.server_feature_flags }
- it { is_expected.to be_a(Hash) }
- it { is_expected.to eq("gitaly-feature-mep-mep" => "false") }
- end
+ it { is_expected.to be_a(Hash) }
+ it { is_expected.to eq("gitaly-feature-mep-mep" => "true") }
end
end