diff options
author | Alex Groleau <agroleau@gitlab.com> | 2019-08-27 12:41:39 -0400 |
---|---|---|
committer | Alex Groleau <agroleau@gitlab.com> | 2019-08-27 12:41:39 -0400 |
commit | aa01f092829facd1044ad02f334422b7dbdc8b0e (patch) | |
tree | a754bf2497820432df7da0f2108bb7527a8dd7b8 /spec/features/usage_stats_consent_spec.rb | |
parent | a1d9c9994a9a4d79b824c3fd9322688303ac8b03 (diff) | |
parent | 6b10779053ff4233c7a64c5ab57754fce63f6710 (diff) | |
download | gitlab-ce-runner-metrics-extractor.tar.gz |
Merge branch 'master' of gitlab_gitlab:gitlab-org/gitlab-cerunner-metrics-extractor
Diffstat (limited to 'spec/features/usage_stats_consent_spec.rb')
-rw-r--r-- | spec/features/usage_stats_consent_spec.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/features/usage_stats_consent_spec.rb b/spec/features/usage_stats_consent_spec.rb index dd8f3179895..14232b1b370 100644 --- a/spec/features/usage_stats_consent_spec.rb +++ b/spec/features/usage_stats_consent_spec.rb @@ -8,7 +8,15 @@ describe 'Usage stats consent' do let(:message) { 'To help improve GitLab, we would like to periodically collect usage information.' } before do - allow(user).to receive(:has_current_license?).and_return false + if Gitlab.ee? + allow_any_instance_of(EE::User) + .to receive(:has_current_license?) + .and_return(false) + else + allow(user) + .to receive(:has_current_license?) + .and_return(false) + end gitlab_sign_in(user) end |