diff options
author | blackst0ne <blackst0ne.ru@gmail.com> | 2018-12-18 01:52:17 +0300 |
---|---|---|
committer | blackst0ne <blackst0ne.ru@gmail.com> | 2018-12-19 02:04:31 +0300 |
commit | b44a2c801a64fb282cea794871fcfcf81e4ec539 (patch) | |
tree | 32e699b6efa548048abe11f29f84e85e3d2a034f /spec/controllers/boards | |
parent | 5d68c23792e87e710877e4baf57605bcf11a6cb5 (diff) |
Update specs to rails5 format
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/controllers/boards')
-rw-r--r-- | spec/controllers/boards/issues_controller_spec.rb | 24 | ||||
-rw-r--r-- | spec/controllers/boards/lists_controller_spec.rb | 36 |
2 files changed, 36 insertions, 24 deletions
diff --git a/spec/controllers/boards/issues_controller_spec.rb b/spec/controllers/boards/issues_controller_spec.rb index 6d0483f0032..8657fc2ebc0 100644 --- a/spec/controllers/boards/issues_controller_spec.rb +++ b/spec/controllers/boards/issues_controller_spec.rb @@ -153,7 +153,7 @@ describe Boards::IssuesController do params[:project_id] = project end - get :index, params.compact + get :index, params: params.compact end end @@ -230,9 +230,11 @@ describe Boards::IssuesController do def create_issue(user:, board:, list:, title:) sign_in(user) - post :create, board_id: board.to_param, - list_id: list.to_param, - issue: { title: title, project_id: project.id }, + post :create, params: { + board_id: board.to_param, + list_id: list.to_param, + issue: { title: title, project_id: project.id } + }, format: :json end end @@ -291,12 +293,14 @@ describe Boards::IssuesController do def move(user:, board:, issue:, from_list_id:, to_list_id:) sign_in(user) - patch :update, namespace_id: project.namespace.to_param, - project_id: project.id, - board_id: board.to_param, - id: issue.id, - from_list_id: from_list_id, - to_list_id: to_list_id, + patch :update, params: { + namespace_id: project.namespace.to_param, + project_id: project.id, + board_id: board.to_param, + id: issue.id, + from_list_id: from_list_id, + to_list_id: to_list_id + }, format: :json end end diff --git a/spec/controllers/boards/lists_controller_spec.rb b/spec/controllers/boards/lists_controller_spec.rb index 16ccf405247..70033857168 100644 --- a/spec/controllers/boards/lists_controller_spec.rb +++ b/spec/controllers/boards/lists_controller_spec.rb @@ -46,9 +46,11 @@ describe Boards::ListsController do def read_board_list(user:, board:) sign_in(user) - get :index, namespace_id: project.namespace.to_param, - project_id: project, - board_id: board.to_param, + get :index, params: { + namespace_id: project.namespace.to_param, + project_id: project, + board_id: board.to_param + }, format: :json end end @@ -103,10 +105,12 @@ describe Boards::ListsController do def create_board_list(user:, board:, label_id:) sign_in(user) - post :create, namespace_id: project.namespace.to_param, - project_id: project, - board_id: board.to_param, - list: { label_id: label_id }, + post :create, params: { + namespace_id: project.namespace.to_param, + project_id: project, + board_id: board.to_param, + list: { label_id: label_id } + }, format: :json end end @@ -201,10 +205,12 @@ describe Boards::ListsController do def remove_board_list(user:, board:, list:) sign_in(user) - delete :destroy, namespace_id: project.namespace.to_param, - project_id: project, - board_id: board.to_param, - id: list.to_param, + delete :destroy, params: { + namespace_id: project.namespace.to_param, + project_id: project, + board_id: board.to_param, + id: list.to_param + }, format: :json end end @@ -245,9 +251,11 @@ describe Boards::ListsController do def generate_default_lists(user:, board:) sign_in(user) - post :generate, namespace_id: project.namespace.to_param, - project_id: project, - board_id: board.to_param, + post :generate, params: { + namespace_id: project.namespace.to_param, + project_id: project, + board_id: board.to_param + }, format: :json end end |