summaryrefslogtreecommitdiff
path: root/spec/controllers/projects
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-14 15:06:07 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-14 15:06:07 +0000
commit429d1abad29d379d8bc8f5219eb72384ad485deb (patch)
tree5c8f9c96c203dbeb3e3e89f3979ce60453340f3f /spec/controllers/projects
parente464f195ff5debc3e9aad0f8c4537404b92019c6 (diff)
downloadgitlab-ce-429d1abad29d379d8bc8f5219eb72384ad485deb.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers/projects')
-rw-r--r--spec/controllers/projects/settings/ci_cd_controller_spec.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/controllers/projects/settings/ci_cd_controller_spec.rb b/spec/controllers/projects/settings/ci_cd_controller_spec.rb
index f4dbfbe15e8..93507b58910 100644
--- a/spec/controllers/projects/settings/ci_cd_controller_spec.rb
+++ b/spec/controllers/projects/settings/ci_cd_controller_spec.rb
@@ -215,6 +215,30 @@ describe Projects::Settings::CiCdController do
expect(project.ci_default_git_depth).to eq(10)
end
end
+
+ context 'when max_artifacts_size is specified' do
+ let(:params) { { max_artifacts_size: 10 } }
+
+ context 'and user is not an admin' do
+ it 'does not set max_artifacts_size' do
+ subject
+
+ project.reload
+ expect(project.max_artifacts_size).to be_nil
+ end
+ end
+
+ context 'and user is an admin' do
+ let(:user) { create(:admin) }
+
+ it 'sets max_artifacts_size' do
+ subject
+
+ project.reload
+ expect(project.max_artifacts_size).to eq(10)
+ end
+ end
+ end
end
end
end