summaryrefslogtreecommitdiff
path: root/spec/controllers/instance_statistics
diff options
context:
space:
mode:
authorLuke Bennett <lbennett@gitlab.com>2018-09-06 12:43:14 +0000
committerPhil Hughes <me@iamphill.com>2018-09-06 12:43:14 +0000
commit7e7ca9faf1f8270d54f7731747db0d44c928492c (patch)
tree64294529de4536a0cc2e66dbc6bdd6c9f5547ae3 /spec/controllers/instance_statistics
parent55b5264043bdecbbb5971c55c27ccbbeb0eb041e (diff)
downloadgitlab-ce-7e7ca9faf1f8270d54f7731747db0d44c928492c.tar.gz
Resolve "Remove usage ping payload from Cohorts, add to Settings"
Diffstat (limited to 'spec/controllers/instance_statistics')
-rw-r--r--spec/controllers/instance_statistics/cohorts_controller_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/controllers/instance_statistics/cohorts_controller_spec.rb b/spec/controllers/instance_statistics/cohorts_controller_spec.rb
index e4eedede93a..596d3c7abe5 100644
--- a/spec/controllers/instance_statistics/cohorts_controller_spec.rb
+++ b/spec/controllers/instance_statistics/cohorts_controller_spec.rb
@@ -3,5 +3,19 @@
require 'spec_helper'
describe InstanceStatistics::CohortsController do
+ let(:user) { create(:user) }
+
+ before do
+ sign_in(user)
+ end
+
it_behaves_like 'instance statistics availability'
+
+ it 'renders a 404 when the usage ping is disabled' do
+ stub_application_setting(usage_ping_enabled: false)
+
+ get :index
+
+ expect(response).to have_gitlab_http_status(:not_found)
+ end
end