diff options
Diffstat (limited to 'spec')
-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 |