diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 18:42:06 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 18:42:06 +0000 |
commit | 6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch) | |
tree | 78be5963ec075d80116a932011d695dd33910b4e /spec/requests/api/group_variables_spec.rb | |
parent | 1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff) | |
download | gitlab-ce-6e4e1050d9dba2b7b2523fdd1768823ab85feef4.tar.gz |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'spec/requests/api/group_variables_spec.rb')
-rw-r--r-- | spec/requests/api/group_variables_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/requests/api/group_variables_spec.rb b/spec/requests/api/group_variables_spec.rb index c6d6ae1615b..41b013f49ee 100644 --- a/spec/requests/api/group_variables_spec.rb +++ b/spec/requests/api/group_variables_spec.rb @@ -169,6 +169,14 @@ RSpec.describe API::GroupVariables do expect(response).to have_gitlab_http_status(:not_found) end + + it 'responds with 400 if the update fails' do + put api("/groups/#{group.id}/variables/#{variable.key}", user), params: { value: 'shrt', masked: true } + + expect(response).to have_gitlab_http_status(:bad_request) + expect(variable.reload.masked).to eq(false) + expect(json_response['message']).to eq('value' => ['is invalid']) + end end context 'authorized user with invalid permissions' do |