summaryrefslogtreecommitdiff
path: root/spec/requests/api/settings_spec.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-03-07 16:55:03 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-03-07 16:55:03 +0800
commitfb167787f2c470649195a5d623f489ec2c3a9117 (patch)
treead60222b53a11ee2b29131f57e24ba66dd823c3d /spec/requests/api/settings_spec.rb
parent7c9cff3a744a64848207bfde1aedcfe652f07dce (diff)
parent24f1ee5e9b1f4d9bc8cff581419b091756da8deb (diff)
downloadgitlab-ce-fb167787f2c470649195a5d623f489ec2c3a9117.tar.gz
Merge remote-tracking branch 'upstream/master' into set-default-cache-key-for-jobs
* upstream/master: (289 commits) re-add Assign to Me link on new MR/Issue forms thinner bottom header border make header match old 16px padding of body contents Update font-awesome-rails to 4.7.0.1 Relax font-awesome-rails dependency to ~> 4.7 Restore keyboard shortcuts for "Activity" and "Charts" fix border radius bottom for header match padding for mr-widget sections Update changelog Fix project-last-commit alignment Docs: update GL Pages IP on GL.com Fix up @DouweM review Remove readme-only project view preference Add `uploads` to known models for Import/Export spec Add `has_many` associations for models that can have Upload records Handle relative and absolute Upload paths in the Uploaders Change the default CarrierWave root path for tests Fix Projects::UploadService spec Add a Project::UploadsController spec to ensure an Upload is created Add `RecordsUploads` module to record Upload records via callbacks ...
Diffstat (limited to 'spec/requests/api/settings_spec.rb')
-rw-r--r--spec/requests/api/settings_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/requests/api/settings_spec.rb b/spec/requests/api/settings_spec.rb
index 411905edb49..11b4b718e2c 100644
--- a/spec/requests/api/settings_spec.rb
+++ b/spec/requests/api/settings_spec.rb
@@ -18,6 +18,9 @@ describe API::Settings, 'Settings', api: true do
expect(json_response['koding_url']).to be_nil
expect(json_response['plantuml_enabled']).to be_falsey
expect(json_response['plantuml_url']).to be_nil
+ expect(json_response['default_project_visibility']).to be_a String
+ expect(json_response['default_snippet_visibility']).to be_a String
+ expect(json_response['default_group_visibility']).to be_a String
end
end
@@ -37,6 +40,8 @@ describe API::Settings, 'Settings', api: true do
koding_url: 'http://koding.example.com',
plantuml_enabled: true,
plantuml_url: 'http://plantuml.example.com',
+ default_snippet_visibility: 'internal',
+ restricted_visibility_levels: ['public'],
default_artifacts_expire_in: '2 days'
expect(response).to have_http_status(200)
expect(json_response['default_projects_limit']).to eq(3)
@@ -47,6 +52,8 @@ describe API::Settings, 'Settings', api: true do
expect(json_response['koding_url']).to eq('http://koding.example.com')
expect(json_response['plantuml_enabled']).to be_truthy
expect(json_response['plantuml_url']).to eq('http://plantuml.example.com')
+ expect(json_response['default_snippet_visibility']).to eq('internal')
+ expect(json_response['restricted_visibility_levels']).to eq(['public'])
expect(json_response['default_artifacts_expire_in']).to eq('2 days')
end
end