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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 18:44:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 18:44:42 +0300
commit4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch)
tree5423a1c7516cffe36384133ade12572cf709398d /spec/requests/api/labels_spec.rb
parente570267f2f6b326480d284e0164a6464ba4081bc (diff)
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'spec/requests/api/labels_spec.rb')
-rw-r--r--spec/requests/api/labels_spec.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/spec/requests/api/labels_spec.rb b/spec/requests/api/labels_spec.rb
index 26377c40b73..f2ceedf6dbd 100644
--- a/spec/requests/api/labels_spec.rb
+++ b/spec/requests/api/labels_spec.rb
@@ -57,7 +57,7 @@ RSpec.describe API::Labels do
put_labels_api(route_type, user, spec_params)
expect(response).to have_gitlab_http_status(:bad_request)
- expect(json_response['error']).to eq('new_name, color, description, priority are missing, '\
+ expect(json_response['error']).to eq('new_name, color, description, priority, remove_on_close are missing, '\
'at least one parameter must be provided')
end
@@ -112,6 +112,14 @@ RSpec.describe API::Labels do
expect(json_response['id']).to eq(expected_response_label_id)
expect(json_response['priority']).to eq(10)
end
+
+ it "returns 200 if remove_on_close is changed (#{route_type} route)" do
+ put_labels_api(route_type, user, spec_params, remove_on_close: true)
+
+ expect(response).to have_gitlab_http_status(:ok)
+ expect(json_response['id']).to eq(expected_response_label_id)
+ expect(json_response['remove_on_close']).to eq(true)
+ end
end
it 'returns 200 if a priority is removed (deprecated route)' do
@@ -301,7 +309,8 @@ RSpec.describe API::Labels do
name: valid_label_title_2,
color: '#FFAABB',
description: 'test',
- priority: 2
+ priority: 2,
+ remove_on_close: true
}
expect(response).to have_gitlab_http_status(:created)
@@ -309,6 +318,7 @@ RSpec.describe API::Labels do
expect(json_response['color']).to eq('#FFAABB')
expect(json_response['description']).to eq('test')
expect(json_response['priority']).to eq(2)
+ expect(json_response['remove_on_close']).to eq(true)
end
it 'returns created label when only required params' do