Fix conversion of integer into string in board spec
In rails 5 controller specs, integers are converted to strings unless conte-type is set with `as: :json`: https://github.com/rails/rails/issues/26069
This commit is contained in:
parent
f646a8b9bc
commit
7fcfe7ccab
1 changed files with 12 additions and 6 deletions
|
@ -156,12 +156,18 @@ describe Boards::ListsController do
|
|||
def move(user:, board:, list:, position:)
|
||||
sign_in(user)
|
||||
|
||||
patch :update, namespace_id: project.namespace.to_param,
|
||||
project_id: project,
|
||||
board_id: board.to_param,
|
||||
id: list.to_param,
|
||||
list: { position: position },
|
||||
format: :json
|
||||
params = { namespace_id: project.namespace.to_param,
|
||||
project_id: project,
|
||||
board_id: board.to_param,
|
||||
id: list.to_param,
|
||||
list: { position: position },
|
||||
format: :json }
|
||||
|
||||
if Gitlab.rails5?
|
||||
patch :update, params: params, as: :json
|
||||
else
|
||||
patch :update, params
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue