diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-22 03:09:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-22 03:09:11 +0300 |
commit | 4407fa18edc418f6db9004d09e3c45ab4bca8a1e (patch) | |
tree | 13165cd61ef68b7bf6c4c3b8de79765e998422c2 /spec/experiments | |
parent | 7e3f469a40a784f8eb41138361b18aaa0de491cf (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/experiments')
-rw-r--r-- | spec/experiments/force_company_trial_experiment_spec.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/experiments/force_company_trial_experiment_spec.rb b/spec/experiments/force_company_trial_experiment_spec.rb new file mode 100644 index 00000000000..42a3245771a --- /dev/null +++ b/spec/experiments/force_company_trial_experiment_spec.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe ForceCompanyTrialExperiment, :experiment do + subject { described_class.new(current_user: user) } + + let(:user) { create(:user, setup_for_company: setup_for_company) } + let(:setup_for_company) { true } + + context 'when a user is setup_for_company' do + it 'is not excluded' do + expect(subject).not_to exclude(user: user) + end + end + + context 'when a user is not setup_for_company' do + let(:setup_for_company) { nil } + + it 'is excluded' do + expect(subject).to exclude(user: user) + end + end +end |