diff options
author | Alexandru Croitor <acroitor@gitlab.com> | 2019-04-24 16:08:14 +0300 |
---|---|---|
committer | Alexandru Croitor <acroitor@gitlab.com> | 2019-05-15 10:15:17 +0300 |
commit | f117c032ac6c414e6c1dfeab98184363c1f61608 (patch) | |
tree | d3c5beb5363112dccbd2fa0cbcff573121eafda3 /spec/support/shared_examples | |
parent | a4fbf39eca4518598e893f6f1b81b8b69927c6f9 (diff) | |
download | gitlab-ce-f117c032ac6c414e6c1dfeab98184363c1f61608.tar.gz |
Add params validations and remove extra params support
Remove label_name and milestone_title params support
Add mutually_exclusive validation for author_id and author_username
Add mutually_exclusive validation for assignee_id and assignee_username
Add validation to allow single value for asignee_username on CE
Add separate issue_stats_params helper for statistics params and
reuse in issues_params.
Diffstat (limited to 'spec/support/shared_examples')
-rw-r--r-- | spec/support/shared_examples/requests/api/issues_shared_example_spec.rb | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/spec/support/shared_examples/requests/api/issues_shared_example_spec.rb b/spec/support/shared_examples/requests/api/issues_shared_example_spec.rb index 2454b1a9761..d1c8e2208a3 100644 --- a/spec/support/shared_examples/requests/api/issues_shared_example_spec.rb +++ b/spec/support/shared_examples/requests/api/issues_shared_example_spec.rb @@ -28,19 +28,7 @@ shared_examples 'labeled issues with labels and label_name params' do it_behaves_like 'returns label names' end - context 'array of labeled issues when all labels match the label_name param' do - let(:params) { { label_name: "#{label.title},#{label_b.title},#{label_c.title}" } } - - it_behaves_like 'returns label names' - end - - context 'array of labeled issues when all labels match with label_name param as array' do - let(:params) { { label_name: [label.title, label_b.title, label_c.title] } } - - it_behaves_like 'returns label names' - end - - context 'with labels data' do + context 'when with_labels_data provided' do context 'array of labeled issues when all labels match' do let(:params) { { labels: "#{label.title},#{label_b.title},#{label_c.title}", with_labels_data: true } } @@ -52,17 +40,5 @@ shared_examples 'labeled issues with labels and label_name params' do it_behaves_like 'returns basic label entity' end - - context 'array of labeled issues when all labels match the label_name param' do - let(:params) { { label_name: "#{label.title},#{label_b.title},#{label_c.title}", with_labels_data: true } } - - it_behaves_like 'returns basic label entity' - end - - context 'array of labeled issues when all labels match with label_name param as array' do - let(:params) { { label_name: [label.title, label_b.title, label_c.title], with_labels_data: true } } - - it_behaves_like 'returns basic label entity' - end end end |