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/experimentation_spec.rb')
-rw-r--r--spec/lib/gitlab/experimentation_spec.rb21
1 files changed, 2 insertions, 19 deletions
diff --git a/spec/lib/gitlab/experimentation_spec.rb b/spec/lib/gitlab/experimentation_spec.rb
index ebf98a0151f..4130d5f9184 100644
--- a/spec/lib/gitlab/experimentation_spec.rb
+++ b/spec/lib/gitlab/experimentation_spec.rb
@@ -13,7 +13,6 @@ RSpec.describe Gitlab::Experimentation::EXPERIMENTS do
:invite_members_version_a,
:invite_members_version_b,
:invite_members_empty_group_version_a,
- :new_create_project_ui,
:contact_sales_btn_in_app,
:customize_homepage,
:invite_email,
@@ -33,27 +32,25 @@ RSpec.describe Gitlab::Experimentation, :snowplow do
before do
stub_const('Gitlab::Experimentation::EXPERIMENTS', {
backwards_compatible_test_experiment: {
- environment: environment,
tracking_category: 'Team',
use_backwards_compatible_subject_index: true
},
test_experiment: {
- environment: environment,
tracking_category: 'Team'
}
})
Feature.enable_percentage_of_time(:backwards_compatible_test_experiment_experiment_percentage, enabled_percentage)
Feature.enable_percentage_of_time(:test_experiment_experiment_percentage, enabled_percentage)
+ allow(Gitlab).to receive(:com?).and_return(true)
end
- let(:environment) { Rails.env.test? }
let(:enabled_percentage) { 10 }
describe '.enabled?' do
subject { described_class.enabled?(:test_experiment) }
- context 'feature toggle is enabled, we are on the right environment and we are selected' do
+ context 'feature toggle is enabled and we are selected' do
it { is_expected.to be_truthy }
end
@@ -68,20 +65,6 @@ RSpec.describe Gitlab::Experimentation, :snowplow do
it { is_expected.to be_falsey }
end
-
- describe 'we are on the wrong environment' do
- let(:environment) { ::Gitlab.com? }
-
- it { is_expected.to be_falsey }
-
- it 'ensures the typically less expensive environment is checked before the more expensive call to database for Feature' do
- expect_next_instance_of(described_class::Experiment) do |experiment|
- expect(experiment).not_to receive(:enabled?)
- end
-
- subject
- end
- end
end
describe '.enabled_for_value?' do