diff options
Diffstat (limited to 'spec/helpers/one_trust_helper_spec.rb')
-rw-r--r-- | spec/helpers/one_trust_helper_spec.rb | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/spec/helpers/one_trust_helper_spec.rb b/spec/helpers/one_trust_helper_spec.rb index 85c38885304..20b731ac73d 100644 --- a/spec/helpers/one_trust_helper_spec.rb +++ b/spec/helpers/one_trust_helper_spec.rb @@ -4,11 +4,8 @@ require "spec_helper" RSpec.describe OneTrustHelper do describe '#one_trust_enabled?' do - let(:user) { nil } - before do stub_config(extra: { one_trust_id: SecureRandom.uuid }) - allow(helper).to receive(:current_user).and_return(user) end subject(:one_trust_enabled?) { helper.one_trust_enabled? } @@ -18,20 +15,10 @@ RSpec.describe OneTrustHelper do stub_feature_flags(ecomm_instrumentation: false) end - context 'when id is set and no user is set' do - let(:user) { instance_double('User') } - - it { is_expected.to be_falsey } - end + it { is_expected.to be_falsey } end context 'with ecomm_instrumentation feature flag enabled' do - context 'when current user is set' do - let(:user) { instance_double('User') } - - it { is_expected.to be_falsey } - end - context 'when no id is set' do before do stub_config(extra: {}) @@ -39,10 +26,6 @@ RSpec.describe OneTrustHelper do it { is_expected.to be_falsey } end - - context 'when id is set and no user is set' do - it { is_expected.to be_truthy } - end end end end |