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
path: root/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-01-28 00:15:03 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-01-28 00:15:03 +0300
commitad928016f48a2f78168d1994c6012622af77f045 (patch)
tree67a2812f431bb258360d02109f00950958688d7b /spec
parent956c34e4688544cba1ceee3205242df3b3a9fe30 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/groups_controller_spec.rb23
-rw-r--r--spec/experiments/require_verification_for_namespace_creation_experiment_spec.rb18
2 files changed, 1 insertions, 40 deletions
diff --git a/spec/controllers/groups_controller_spec.rb b/spec/controllers/groups_controller_spec.rb
index a82c5681911..62171528695 100644
--- a/spec/controllers/groups_controller_spec.rb
+++ b/spec/controllers/groups_controller_spec.rb
@@ -132,29 +132,6 @@ RSpec.describe GroupsController, factory_default: :keep do
end
end
end
-
- describe 'require_verification_for_namespace_creation experiment', :experiment do
- before do
- sign_in(owner)
- stub_experiments(require_verification_for_namespace_creation: :candidate)
- end
-
- it 'tracks a "start_create_group" event' do
- expect(experiment(:require_verification_for_namespace_creation)).to track(
- :start_create_group
- ).on_next_instance.with_context(user: owner)
-
- get :new
- end
-
- context 'when creating a sub-group' do
- it 'does not track a "start_create_group" event' do
- expect(experiment(:require_verification_for_namespace_creation)).not_to track(:start_create_group)
-
- get :new, params: { parent_id: group.id }
- end
- end
- end
end
describe 'GET #activity' do
diff --git a/spec/experiments/require_verification_for_namespace_creation_experiment_spec.rb b/spec/experiments/require_verification_for_namespace_creation_experiment_spec.rb
index 5d9b0770fb5..87417fe1637 100644
--- a/spec/experiments/require_verification_for_namespace_creation_experiment_spec.rb
+++ b/spec/experiments/require_verification_for_namespace_creation_experiment_spec.rb
@@ -5,7 +5,7 @@ require 'spec_helper'
RSpec.describe RequireVerificationForNamespaceCreationExperiment, :experiment do
subject(:experiment) { described_class.new(user: user) }
- let(:user) { create(:user, created_at: RequireVerificationForNamespaceCreationExperiment::EXPERIMENT_START_DATE + 1.hour) }
+ let_it_be(:user) { create(:user) }
describe '#candidate?' do
context 'when experiment subject is candidate' do
@@ -56,20 +56,4 @@ RSpec.describe RequireVerificationForNamespaceCreationExperiment, :experiment do
end
end
end
-
- describe 'exclusions' do
- context 'when user is new' do
- it 'is not excluded' do
- expect(subject).not_to exclude(user: user)
- end
- end
-
- context 'when user is NOT new' do
- let(:user) { create(:user, created_at: RequireVerificationForNamespaceCreationExperiment::EXPERIMENT_START_DATE - 1.day) }
-
- it 'is excluded' do
- expect(subject).to exclude(user: user)
- end
- end
- end
end