summaryrefslogtreecommitdiff
path: root/spec/requests/api/todos_spec.rb
diff options
context:
space:
mode:
authorblackst0ne <blackst0ne.ru@gmail.com>2018-12-18 09:52:17 +1100
committerblackst0ne <blackst0ne.ru@gmail.com>2018-12-19 10:04:31 +1100
commitb44a2c801a64fb282cea794871fcfcf81e4ec539 (patch)
tree32e699b6efa548048abe11f29f84e85e3d2a034f /spec/requests/api/todos_spec.rb
parent5d68c23792e87e710877e4baf57605bcf11a6cb5 (diff)
downloadgitlab-ce-b44a2c801a64fb282cea794871fcfcf81e4ec539.tar.gz
Update specs to rails5 formatblackst0ne-convert-specs-rails5-style
Updates specs to use new rails5 format. The old format: `get :show, { some: params }, { some: headers }` The new format: `get :show, params: { some: params }, headers: { some: headers }`
Diffstat (limited to 'spec/requests/api/todos_spec.rb')
-rw-r--r--spec/requests/api/todos_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/requests/api/todos_spec.rb b/spec/requests/api/todos_spec.rb
index b5cf04e7f22..f121a1d3b78 100644
--- a/spec/requests/api/todos_spec.rb
+++ b/spec/requests/api/todos_spec.rb
@@ -49,7 +49,7 @@ describe API::Todos do
context 'and using the author filter' do
it 'filters based on author_id param' do
- get api('/todos', john_doe), { author_id: author_2.id }
+ get api('/todos', john_doe), params: { author_id: author_2.id }
expect(response.status).to eq(200)
expect(response).to include_pagination_headers
@@ -62,7 +62,7 @@ describe API::Todos do
it 'filters based on type param' do
create(:todo, project: project_1, author: author_2, user: john_doe, target: merge_request)
- get api('/todos', john_doe), { type: 'MergeRequest' }
+ get api('/todos', john_doe), params: { type: 'MergeRequest' }
expect(response.status).to eq(200)
expect(response).to include_pagination_headers
@@ -73,7 +73,7 @@ describe API::Todos do
context 'and using the state filter' do
it 'filters based on state param' do
- get api('/todos', john_doe), { state: 'done' }
+ get api('/todos', john_doe), params: { state: 'done' }
expect(response.status).to eq(200)
expect(response).to include_pagination_headers
@@ -84,7 +84,7 @@ describe API::Todos do
context 'and using the project filter' do
it 'filters based on project_id param' do
- get api('/todos', john_doe), { project_id: project_2.id }
+ get api('/todos', john_doe), params: { project_id: project_2.id }
expect(response.status).to eq(200)
expect(response).to include_pagination_headers
@@ -95,7 +95,7 @@ describe API::Todos do
context 'and using the group filter' do
it 'filters based on project_id param' do
- get api('/todos', john_doe), { group_id: group.id, sort: :target_id }
+ get api('/todos', john_doe), params: { group_id: group.id, sort: :target_id }
expect(response.status).to eq(200)
expect(response).to include_pagination_headers
@@ -106,7 +106,7 @@ describe API::Todos do
context 'and using the action filter' do
it 'filters based on action param' do
- get api('/todos', john_doe), { action: 'mentioned' }
+ get api('/todos', john_doe), params: { action: 'mentioned' }
expect(response.status).to eq(200)
expect(response).to include_pagination_headers