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
path: root/spec
diff options
context:
space:
mode:
authorJose Ivan Vargas <jvargas@gitlab.com>2018-08-06 19:58:52 +0300
committerJose Ivan Vargas <jvargas@gitlab.com>2018-08-06 19:58:52 +0300
commite8b5bbf1946d295c8c642c2a23bffd3c98403829 (patch)
treeff8617a6d7f76cbd1ac5a74257c331739aaa7803 /spec
parent1fb648a35bc7914e2c06482480d935f40d764bff (diff)
parente96862f2110a3ec35fd4a6a220c99d93879b1ac5 (diff)
Merge branch 'revert-77c75d2b' into 'master'
Revert "Merge branch 'bvl-instance-stats-default' into 'master'" See merge request gitlab-org/gitlab-ce!21054
Diffstat (limited to 'spec')
-rw-r--r--spec/features/dashboard/active_tab_spec.rb4
-rw-r--r--spec/policies/global_policy_spec.rb16
-rw-r--r--spec/requests/api/settings_spec.rb2
-rw-r--r--spec/support/shared_examples/instance_statistics_controllers_shared_examples.rb2
4 files changed, 3 insertions, 21 deletions
diff --git a/spec/features/dashboard/active_tab_spec.rb b/spec/features/dashboard/active_tab_spec.rb
index a7d86bd4560..f4d0f82d248 100644
--- a/spec/features/dashboard/active_tab_spec.rb
+++ b/spec/features/dashboard/active_tab_spec.rb
@@ -35,10 +35,6 @@ RSpec.describe 'Dashboard Active Tab', :js do
context 'on instance statistics' do
subject { visit instance_statistics_root_path }
- before do
- stub_application_setting(instance_statistics_visibility_private: false)
- end
-
it 'shows Instance Statistics` as active' do
subject
diff --git a/spec/policies/global_policy_spec.rb b/spec/policies/global_policy_spec.rb
index 35f1912c1c8..30d68e7dc9d 100644
--- a/spec/policies/global_policy_spec.rb
+++ b/spec/policies/global_policy_spec.rb
@@ -183,13 +183,7 @@ describe GlobalPolicy do
describe 'read instance statistics' do
context 'regular user' do
- context 'when instance statistics are publicly available' do
- before do
- stub_application_setting(instance_statistics_visibility_private: false)
- end
-
- it { is_expected.to be_allowed(:read_instance_statistics) }
- end
+ it { is_expected.to be_allowed(:read_instance_statistics) }
context 'when instance statistics are set to private' do
before do
@@ -203,13 +197,7 @@ describe GlobalPolicy do
context 'admin' do
let(:current_user) { create(:admin) }
- context 'when instance statistics are publicly available' do
- before do
- stub_application_setting(instance_statistics_visibility_private: false)
- end
-
- it { is_expected.to be_allowed(:read_instance_statistics) }
- end
+ it { is_expected.to be_allowed(:read_instance_statistics) }
context 'when instance statistics are set to private' do
before do
diff --git a/spec/requests/api/settings_spec.rb b/spec/requests/api/settings_spec.rb
index 9a662c21354..3e0f47b84a1 100644
--- a/spec/requests/api/settings_spec.rb
+++ b/spec/requests/api/settings_spec.rb
@@ -25,7 +25,7 @@ describe API::Settings, 'Settings' do
expect(json_response['ed25519_key_restriction']).to eq(0)
expect(json_response['circuitbreaker_failure_count_threshold']).not_to be_nil
expect(json_response['performance_bar_allowed_group_id']).to be_nil
- expect(json_response['instance_statistics_visibility_private']).to be(true)
+ expect(json_response['instance_statistics_visibility_private']).to be(false)
expect(json_response).not_to have_key('performance_bar_allowed_group_path')
expect(json_response).not_to have_key('performance_bar_enabled')
end
diff --git a/spec/support/shared_examples/instance_statistics_controllers_shared_examples.rb b/spec/support/shared_examples/instance_statistics_controllers_shared_examples.rb
index 9f0604b5f8e..5334af841e1 100644
--- a/spec/support/shared_examples/instance_statistics_controllers_shared_examples.rb
+++ b/spec/support/shared_examples/instance_statistics_controllers_shared_examples.rb
@@ -9,8 +9,6 @@ shared_examples 'instance statistics availability' do
describe 'GET #index' do
it 'is available when the feature is available publicly' do
- stub_application_setting(instance_statistics_visibility_private: false)
-
get :index
expect(response).to have_gitlab_http_status(:success)