summaryrefslogtreecommitdiff
path: root/spec/controllers/projects
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-08-15 18:39:26 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-08-17 12:58:59 -0300
commit8e4e294a7cc8725869964cf56842124aec54ca12 (patch)
treed5acdaf8f25bd7e7d2420c152ba15964cae13ac3 /spec/controllers/projects
parent01b9744d1eb2bf9af80758ed5e112171b1b7f2b0 (diff)
downloadgitlab-ce-8e4e294a7cc8725869964cf56842124aec54ca12.tar.gz
Rename from/to params to from_list_id/to_list_id
Diffstat (limited to 'spec/controllers/projects')
-rw-r--r--spec/controllers/projects/board_issues_controller_spec.rb15
1 files changed, 8 insertions, 7 deletions
diff --git a/spec/controllers/projects/board_issues_controller_spec.rb b/spec/controllers/projects/board_issues_controller_spec.rb
index 6ec3a1b8cfc..a23f0fdf9c5 100644
--- a/spec/controllers/projects/board_issues_controller_spec.rb
+++ b/spec/controllers/projects/board_issues_controller_spec.rb
@@ -64,13 +64,13 @@ describe Projects::BoardIssuesController do
context 'with valid params' do
it 'returns a successful 200 response' do
- move user: user, issue: issue, from: list1.id, to: list2.id
+ move user: user, issue: issue, from_list_id: list1.id, to_list_id: list2.id
expect(response).to have_http_status(200)
end
it 'moves issue to the desired list' do
- move user: user, issue: issue, from: list1.id, to: list2.id
+ move user: user, issue: issue, from_list_id: list1.id, to_list_id: list2.id
expect(issue.reload.labels).to contain_exactly(development)
end
@@ -78,13 +78,13 @@ describe Projects::BoardIssuesController do
context 'with invalid params' do
it 'returns a unprocessable entity 422 response for invalid lists' do
- move user: user, issue: issue, from: nil, to: nil
+ move user: user, issue: issue, from_list_id: nil, to_list_id: nil
expect(response).to have_http_status(422)
end
it 'returns a not found 404 response for invalid issue id' do
- move user: user, issue: 999, from: list1.id, to: list2.id
+ move user: user, issue: 999, from_list_id: list1.id, to_list_id: list2.id
expect(response).to have_http_status(404)
end
@@ -98,19 +98,20 @@ describe Projects::BoardIssuesController do
end
it 'returns a successful 403 response' do
- move user: guest, issue: issue, from: list1.id, to: list2.id
+ move user: guest, issue: issue, from_list_id: list1.id, to_list_id: list2.id
expect(response).to have_http_status(403)
end
end
- def move(user:, issue:, from:, to:)
+ def move(user:, issue:, from_list_id:, to_list_id:)
sign_in(user)
patch :update, namespace_id: project.namespace.to_param,
project_id: project.to_param,
id: issue.to_param,
- issue: { from: from, to: to },
+ from_list_id: from_list_id,
+ to_list_id: to_list_id,
format: :json
end
end