Commit f8165f37 authored by Peter Leitzen's avatar Peter Leitzen

Merge branch '258994-fix-deprecation-issues-controller-spec' into 'master'

Fix kwargs deprecation warnings in issues controller spec

See merge request gitlab-org/gitlab!48887
parents f856c8d9 3f372a2e
...@@ -1128,12 +1128,12 @@ RSpec.describe Projects::IssuesController do ...@@ -1128,12 +1128,12 @@ RSpec.describe Projects::IssuesController do
{ merge_request_to_resolve_discussions_of: merge_request.iid } { merge_request_to_resolve_discussions_of: merge_request.iid }
end end
def post_issue(issue_params, other_params: {}) def post_issue(other_params: {}, **issue_params)
post :create, params: { namespace_id: project.namespace.to_param, project_id: project, issue: issue_params, merge_request_to_resolve_discussions_of: merge_request.iid }.merge(other_params) post :create, params: { namespace_id: project.namespace.to_param, project_id: project, issue: issue_params, merge_request_to_resolve_discussions_of: merge_request.iid }.merge(other_params)
end end
it 'creates an issue for the project' do it 'creates an issue for the project' do
expect { post_issue({ title: 'Hello' }) }.to change { project.issues.reload.size }.by(1) expect { post_issue(title: 'Hello') }.to change { project.issues.reload.size }.by(1)
end end
it "doesn't overwrite given params" do it "doesn't overwrite given params" do
...@@ -1157,7 +1157,7 @@ RSpec.describe Projects::IssuesController do ...@@ -1157,7 +1157,7 @@ RSpec.describe Projects::IssuesController do
describe "resolving a single discussion" do describe "resolving a single discussion" do
before do before do
post_issue({ title: 'Hello' }, other_params: { discussion_to_resolve: discussion.id }) post_issue(title: 'Hello', other_params: { discussion_to_resolve: discussion.id })
end end
it 'resolves a single discussion' do it 'resolves a single discussion' do
discussion.first_note.reload discussion.first_note.reload
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment