Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2019-07-25 17:54:02 +0300
committerYorick Peterse <yorickpeterse@gmail.com>2019-07-29 14:54:15 +0300
commit3fa5ee8907a399c3af4bf60bc712fddf47ec1474 (patch)
tree87cfecfd62232eb6670234b066ee71bef62478de /spec/features/usage_stats_consent_spec.rb
parent3d052438101b1e25117b74d6e0bf2ddf49e41f81 (diff)
Make usage content spec the same for CE and EE
This changes the spec in question so that it is the same for both CE and EE. This requires an `if Gitlab.ee?` since EE requires that we stub an EE specific module, but doing so in CE will break the spec there.
Diffstat (limited to 'spec/features/usage_stats_consent_spec.rb')
-rw-r--r--spec/features/usage_stats_consent_spec.rb10
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