Skip to content

[Rails5.1] Update functional specs to use new keyword format

blackst0ne requested to merge blackst0ne-convert-specs-rails5-style into master

What does this MR do?

Updates specs to use new rails5 format.

Fixes this type of deprecation warnings:

Deprecated style:
get :show, { id: 1 }, nil, { notice: "This is a flash message" }

New keyword style:
get :show, params: { id: 1 }, flash: { notice: "This is a flash message" },
  session: nil # Can safely be omitted.
 (called from block (4 levels) in <main> at /storage/projects/gitlab/gdk-ce/gitlab/spec/controllers/admin/users_controller_spec.rb:262)
DEPRECATION WARNING: Using positional arguments in functional tests has been deprecated,
in favor of keyword arguments, and will be removed in Rails 5.1.

What are the relevant issue numbers?

Closes #54062 (closed)

Does this MR meet the acceptance criteria?

Edited by blackst0ne

Merge request reports