diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-20 16:49:51 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-20 16:49:51 +0300 |
commit | 71786ddc8e28fbd3cb3fcc4b3ff15e5962a1c82e (patch) | |
tree | 6a2d93ef3fb2d353bb7739e4b57e6541f51cdd71 /spec/helpers/bizible_helper_spec.rb | |
parent | a7253423e3403b8c08f8a161e5937e1488f5f407 (diff) |
Add latest changes from gitlab-org/gitlab@15-9-stable-eev15.9.0-rc42
Diffstat (limited to 'spec/helpers/bizible_helper_spec.rb')
-rw-r--r-- | spec/helpers/bizible_helper_spec.rb | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/spec/helpers/bizible_helper_spec.rb b/spec/helpers/bizible_helper_spec.rb index b82211d51ec..c1b79a8e1e2 100644 --- a/spec/helpers/bizible_helper_spec.rb +++ b/spec/helpers/bizible_helper_spec.rb @@ -4,43 +4,43 @@ require "spec_helper" RSpec.describe BizibleHelper do describe '#bizible_enabled?' do - before do - stub_config(extra: { bizible: SecureRandom.uuid }) - end - - context 'when bizible is disabled' do + context 'when bizible config is not true' do before do - allow(helper).to receive(:bizible_enabled?).and_return(false) + stub_config(extra: { bizible: false }) end - it { is_expected.to be_falsey } + it { expect(helper.bizible_enabled?).to be_falsy } end - context 'when bizible is enabled' do + context 'when bizible config is enabled' do before do - allow(helper).to receive(:bizible_enabled?).and_return(true) + stub_config(extra: { bizible: true }) end - it { is_expected.to be_truthy } - end + it { expect(helper.bizible_enabled?).to be_truthy } - subject(:bizible_enabled?) { helper.bizible_enabled? } + context 'with ecomm_instrumentation feature flag disabled' do + before do + stub_feature_flags(ecomm_instrumentation: false) + end - context 'with ecomm_instrumentation feature flag disabled' do - before do - stub_feature_flags(ecomm_instrumentation: false) + it { expect(helper.bizible_enabled?).to be_falsey } end - it { is_expected.to be_falsey } - end + context 'with ecomm_instrumentation feature flag enabled' do + before do + stub_feature_flags(ecomm_instrumentation: true) + end + + it { expect(helper.bizible_enabled?).to be_truthy } + end - context 'with ecomm_instrumentation feature flag enabled' do - context 'when no id is set' do + context 'with invite_email present' do before do - stub_config(extra: {}) + stub_feature_flags(ecomm_instrumentation: true) end - it { is_expected.to be_falsey } + it { expect(helper.bizible_enabled?('test@test.com')).to be_falsy } end end end |