diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-04 15:15:34 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-04 15:15:34 +0000 |
commit | 1b723130416e59bdaef5d662a33f22ac1d3ce953 (patch) | |
tree | 4c18e67d64b30065619300b3172332d8419d7110 /spec/controllers/projects/issues_controller_spec.rb | |
parent | 9486811b62db7f35906bae75f912aa89804e721b (diff) | |
download | gitlab-ce-1b723130416e59bdaef5d662a33f22ac1d3ce953.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers/projects/issues_controller_spec.rb')
-rw-r--r-- | spec/controllers/projects/issues_controller_spec.rb | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/spec/controllers/projects/issues_controller_spec.rb b/spec/controllers/projects/issues_controller_spec.rb index d91c1b0d29a..bf0b833b311 100644 --- a/spec/controllers/projects/issues_controller_spec.rb +++ b/spec/controllers/projects/issues_controller_spec.rb @@ -502,10 +502,7 @@ RSpec.describe Projects::IssuesController do context 'with valid params' do it 'reorders issues and returns a successful 200 response' do - reorder_issue(issue1, - move_after_id: issue2.id, - move_before_id: issue3.id, - group_full_path: group.full_path) + reorder_issue(issue1, move_after_id: issue2.id, move_before_id: issue3.id) [issue1, issue2, issue3].map(&:reload) @@ -531,12 +528,10 @@ RSpec.describe Projects::IssuesController do end it 'returns a unprocessable entity 422 response for issues not in group' do - another_group = create(:group) + other_group_project = create(:project, group: create(:group)) + other_group_issue = create(:issue, project: other_group_project) - reorder_issue(issue1, - move_after_id: issue2.id, - move_before_id: issue3.id, - group_full_path: another_group.full_path) + reorder_issue(issue1, move_after_id: issue2.id, move_before_id: other_group_issue.id) expect(response).to have_gitlab_http_status(:unprocessable_entity) end @@ -555,15 +550,14 @@ RSpec.describe Projects::IssuesController do end end - def reorder_issue(issue, move_after_id: nil, move_before_id: nil, group_full_path: nil) + def reorder_issue(issue, move_after_id: nil, move_before_id: nil) put :reorder, params: { namespace_id: project.namespace.to_param, project_id: project, id: issue.iid, move_after_id: move_after_id, - move_before_id: move_before_id, - group_full_path: group_full_path + move_before_id: move_before_id }, format: :json end |