diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-09 00:08:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-09 00:08:08 +0300 |
commit | e0b84f4ba4b44c8ecf00be97843c40df2550b74c (patch) | |
tree | 7cecae4276358dd46d7fa15f84068f7b4c626089 /spec/requests/api/projects_spec.rb | |
parent | 73391dcc368ef846c2960c1d0ef5e64ca78e1bee (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests/api/projects_spec.rb')
-rw-r--r-- | spec/requests/api/projects_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb index 03efbc6bce7..f2d2cdba480 100644 --- a/spec/requests/api/projects_spec.rb +++ b/spec/requests/api/projects_spec.rb @@ -2251,6 +2251,22 @@ describe API::Projects do put api("/projects/#{project3.id}", user4), params: project_param expect(response).to have_gitlab_http_status(403) end + + it 'updates container_expiration_policy' do + project_param = { + container_expiration_policy_attributes: { + cadence: '1month', + keep_n: 1 + } + } + + put api("/projects/#{project3.id}", user4), params: project_param + + expect(response).to have_gitlab_http_status(200) + + expect(json_response['container_expiration_policy']['cadence']).to eq('1month') + expect(json_response['container_expiration_policy']['keep_n']).to eq(1) + end end context 'when authenticated as project developer' do |