diff --git a/.rubocop.yml b/.rubocop.yml
index ca5c49c3d1206ec97d8302599928351f403a5860..96d0e63055044c361cfa7543f62f5f63fe46d6e4 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -8,7 +8,7 @@ require:
   - rubocop-rspec
 
 AllCops:
-  TargetRailsVersion: 4.2
+  TargetRailsVersion: 5.0
   Exclude:
     - 'vendor/**/*'
     - 'node_modules/**/*'
diff --git a/changelogs/unreleased/blackst0ne-convert-specs-rails5-style.yml b/changelogs/unreleased/blackst0ne-convert-specs-rails5-style.yml
new file mode 100644
index 0000000000000000000000000000000000000000..c29cfec075ca373d55ee9d8e7060d84fcbd35093
--- /dev/null
+++ b/changelogs/unreleased/blackst0ne-convert-specs-rails5-style.yml
@@ -0,0 +1,5 @@
+---
+title: "[Rails5.1] Update functional specs to use new keyword format"
+merge_request: 23095
+author: "@blackst0ne"
+type: other
diff --git a/ee/spec/controllers/admin/appearances_controller_spec.rb b/ee/spec/controllers/admin/appearances_controller_spec.rb
index ecabe57bd43e8cbe5c74bd8fd78582946b42ddaf..d3a30c2e513bb0991d36d6febf65bc940afd97c6 100644
--- a/ee/spec/controllers/admin/appearances_controller_spec.rb
+++ b/ee/spec/controllers/admin/appearances_controller_spec.rb
@@ -23,7 +23,7 @@
       it 'creates appearance with footer and header message' do
         stub_licensed_features(system_header_footer: true)
 
-        post :create, appearance: create_params
+        post :create, params: { appearance: create_params }
 
         expect(Appearance.current).to have_attributes(
           header_message: header_message,
@@ -36,7 +36,7 @@
       it 'does not create appearance with footer and header message' do
         stub_licensed_features(system_header_footer: false)
 
-        post :create, appearance: create_params
+        post :create, params: { appearance: create_params }
 
         expect(Appearance.current).to have_attributes(
           header_message: nil,
@@ -64,7 +64,7 @@
       it 'updates appearance with footer and header message' do
         stub_licensed_features(system_header_footer: true)
 
-        put :update, appearance: update_params
+        put :update, params: { appearance: update_params }
 
         expect(Appearance.current).to have_attributes(
           header_message: header_message,
@@ -77,7 +77,7 @@
       it 'does not update appearance with footer and header message' do
         stub_licensed_features(system_header_footer: false)
 
-        post :create, appearance: update_params
+        post :create, params: { appearance: update_params }
 
         expect(Appearance.current).to have_attributes(
           header_message: nil,
diff --git a/ee/spec/controllers/admin/application_settings_controller_spec.rb b/ee/spec/controllers/admin/application_settings_controller_spec.rb
index 28c752d7fd7419c6001fa4470c467061fa70be9a..2a392bc56499ba7ceea5f493da07f586e732a18a 100644
--- a/ee/spec/controllers/admin/application_settings_controller_spec.rb
+++ b/ee/spec/controllers/admin/application_settings_controller_spec.rb
@@ -37,7 +37,7 @@
           allow_group_owners_to_manage_ldap: false
       }
 
-      put :update, application_setting: settings
+      put :update, params: { application_setting: settings }
 
       expect(response).to redirect_to(admin_application_settings_path)
       settings.except(:elasticsearch_url, :repository_size_limit).each do |setting, value|
@@ -52,14 +52,14 @@
         stub_licensed_features(feature => false)
         attribute_names = settings.keys.map(&:to_s)
 
-        expect { put :update, application_setting: settings }
+        expect { put :update, params: { application_setting: settings } }
           .not_to change { ApplicationSetting.current.reload.attributes.slice(*attribute_names) }
       end
 
       it 'updates settings when the feature is available' do
         stub_licensed_features(feature => true)
 
-        put :update, application_setting: settings
+        put :update, params: { application_setting: settings }
 
         settings.each do |attribute, value|
           expect(ApplicationSetting.current.public_send(attribute)).to eq(value)
@@ -114,35 +114,35 @@
 
     it 'updates the default_project_creation for string value' do
       stub_licensed_features(project_creation_level: true)
-      put :update, application_setting: { default_project_creation: ::EE::Gitlab::Access::MAINTAINER_PROJECT_ACCESS }
+      put :update, params: { application_setting: { default_project_creation: ::EE::Gitlab::Access::MAINTAINER_PROJECT_ACCESS } }
 
       expect(response).to redirect_to(admin_application_settings_path)
       expect(ApplicationSetting.current.default_project_creation).to eq(::EE::Gitlab::Access::MAINTAINER_PROJECT_ACCESS)
     end
 
     it 'updates repository_size_limit' do
-      put :update, application_setting: { repository_size_limit: '100' }
+      put :update, params: { application_setting: { repository_size_limit: '100' } }
 
       expect(response).to redirect_to(admin_application_settings_path)
       expect(response).to set_flash[:notice].to('Application settings saved successfully')
     end
 
     it 'does not accept negative repository_size_limit' do
-      put :update, application_setting: { repository_size_limit: '-100' }
+      put :update, params: { application_setting: { repository_size_limit: '-100' } }
 
       expect(response).to render_template(:show)
       expect(assigns(:application_setting).errors[:repository_size_limit]).to be_present
     end
 
     it 'does not accept invalid repository_size_limit' do
-      put :update, application_setting: { repository_size_limit: 'one thousand' }
+      put :update, params: { application_setting: { repository_size_limit: 'one thousand' } }
 
       expect(response).to render_template(:show)
       expect(assigns(:application_setting).errors[:repository_size_limit]).to be_present
     end
 
     it 'does not accept empty repository_size_limit' do
-      put :update, application_setting: { repository_size_limit: '' }
+      put :update, params: { application_setting: { repository_size_limit: '' } }
 
       expect(response).to render_template(:show)
       expect(assigns(:application_setting).errors[:repository_size_limit]).to be_present
diff --git a/ee/spec/controllers/admin/geo/nodes_controller_spec.rb b/ee/spec/controllers/admin/geo/nodes_controller_spec.rb
index de24535f2748fd61d28dd940e5f832a509de36ba..8174b1c0b1b9f26f0aa7c339ccaa7f917d59e3e5 100644
--- a/ee/spec/controllers/admin/geo/nodes_controller_spec.rb
+++ b/ee/spec/controllers/admin/geo/nodes_controller_spec.rb
@@ -60,7 +60,7 @@ def go
     let(:geo_node_attributes) { { url: 'http://example.com' } }
 
     def go
-      post :create, geo_node: geo_node_attributes
+      post :create, params: { geo_node: geo_node_attributes }
     end
 
     context 'without add-on license' do
@@ -91,7 +91,7 @@ def go
     let(:geo_node) { create(:geo_node) }
 
     def go
-      post :update, id: geo_node, geo_node: geo_node_attributes
+      post :update, params: { id: geo_node, geo_node: geo_node_attributes }
     end
 
     context 'without add-on license' do
diff --git a/ee/spec/controllers/admin/geo/projects_controller_spec.rb b/ee/spec/controllers/admin/geo/projects_controller_spec.rb
index eb47d4df9bf3bfe1efa17e357df57a85adb721d7..999437a79d6f806fe3103a045435b5ca6d361e0e 100644
--- a/ee/spec/controllers/admin/geo/projects_controller_spec.rb
+++ b/ee/spec/controllers/admin/geo/projects_controller_spec.rb
@@ -47,7 +47,7 @@
       end
 
       context 'with sync_status=pending' do
-        subject { get :index, sync_status: 'pending' }
+        subject { get :index, params: { sync_status: 'pending' } }
 
         it 'renders pending template' do
           expect(subject).to have_gitlab_http_status(200)
@@ -57,7 +57,7 @@
       end
 
       context 'with sync_status=failed' do
-        subject { get :index, sync_status: 'failed' }
+        subject { get :index, params: { sync_status: 'failed' } }
 
         it 'renders failed template' do
           expect(subject).to have_gitlab_http_status(200)
@@ -67,7 +67,7 @@
       end
 
       context 'with sync_status=never' do
-        subject { get :index, sync_status: 'never' }
+        subject { get :index, params: { sync_status: 'never' } }
 
         it 'renders failed template' do
           expect(subject).to have_gitlab_http_status(200)
@@ -77,7 +77,7 @@
       end
 
       context 'with sync_status=synced' do
-        subject { get :index, sync_status: 'synced' }
+        subject { get :index, params: { sync_status: 'synced' } }
 
         it 'renders synced template' do
           expect(subject).to have_gitlab_http_status(200)
@@ -89,7 +89,7 @@
   end
 
   describe '#destroy' do
-    subject { delete :destroy, id: synced_registry }
+    subject { delete :destroy, params: { id: synced_registry } }
 
     it_behaves_like 'license required'
 
@@ -119,7 +119,7 @@
   end
 
   describe '#recheck' do
-    subject { post :recheck, id: synced_registry }
+    subject { post :recheck, params: { id: synced_registry } }
 
     it_behaves_like 'license required'
 
@@ -137,7 +137,7 @@
   end
 
   describe '#resync' do
-    subject { post :resync, id: synced_registry }
+    subject { post :resync, params: { id: synced_registry } }
 
     it_behaves_like 'license required'
 
@@ -205,7 +205,7 @@
   end
 
   describe '#force_redownload' do
-    subject { post :force_redownload, id: synced_registry }
+    subject { post :force_redownload, params: { id: synced_registry } }
 
     it_behaves_like 'license required'
 
diff --git a/ee/spec/controllers/admin/groups_controller_spec.rb b/ee/spec/controllers/admin/groups_controller_spec.rb
index c67746a6ba33ed6c30a767715dcb9469440eb829..5a727cdcdbc93f0d80bf8ca7dbc7cd6f706a92df 100644
--- a/ee/spec/controllers/admin/groups_controller_spec.rb
+++ b/ee/spec/controllers/admin/groups_controller_spec.rb
@@ -9,7 +9,7 @@
   end
 
   describe 'POST #reset_runner_minutes' do
-    subject { post :reset_runners_minutes, id: group }
+    subject { post :reset_runners_minutes, params: { id: group } }
 
     before do
       allow_any_instance_of(ClearNamespaceSharedRunnersMinutesService)
@@ -45,7 +45,7 @@
         stub_licensed_features(project_creation_level: false)
 
         expect do
-          post :update, id: group.to_param, group: { project_creation_level: ::EE::Gitlab::Access::NO_ONE_PROJECT_ACCESS }
+          post :update, params: { id: group.to_param, group: { project_creation_level: ::EE::Gitlab::Access::NO_ONE_PROJECT_ACCESS } }
         end.not_to change { group.reload.project_creation_level }
       end
     end
@@ -55,7 +55,7 @@
         stub_licensed_features(project_creation_level: true)
 
         expect do
-          post :update, id: group.to_param, group: { project_creation_level: ::EE::Gitlab::Access::NO_ONE_PROJECT_ACCESS }
+          post :update, params: { id: group.to_param, group: { project_creation_level: ::EE::Gitlab::Access::NO_ONE_PROJECT_ACCESS } }
         end.to change { group.reload.project_creation_level }.to(::EE::Gitlab::Access::NO_ONE_PROJECT_ACCESS)
       end
     end
diff --git a/ee/spec/controllers/admin/licenses_controller_spec.rb b/ee/spec/controllers/admin/licenses_controller_spec.rb
index 18e953abd62925352629f1e4a77f4e4d65795d52..ae7e255d1a317931d340f4ba053003c81cd21fa3 100644
--- a/ee/spec/controllers/admin/licenses_controller_spec.rb
+++ b/ee/spec/controllers/admin/licenses_controller_spec.rb
@@ -9,7 +9,7 @@
 
   describe 'Upload license' do
     it 'redirects back when no license is entered/uploaded' do
-      post :create, license: { data: '' }
+      post :create, params: { license: { data: '' } }
 
       expect(response).to redirect_to new_admin_license_path
       expect(flash[:alert]).to include 'Please enter or upload a license.'
diff --git a/ee/spec/controllers/admin/projects_controller_spec.rb b/ee/spec/controllers/admin/projects_controller_spec.rb
index 363295d66b409beb464f35eb181d0ae06ae63832..c29199925721603e7a40e9f982203468ba382dbb 100644
--- a/ee/spec/controllers/admin/projects_controller_spec.rb
+++ b/ee/spec/controllers/admin/projects_controller_spec.rb
@@ -13,7 +13,7 @@
   end
 
   describe 'GET /projects/:id' do
-    subject { get :show, namespace_id: project.namespace.path, id: project.path }
+    subject { get :show, params: { namespace_id: project.namespace.path, id: project.path } }
 
     render_views
 
diff --git a/ee/spec/controllers/admin/push_rules_controller_spec.rb b/ee/spec/controllers/admin/push_rules_controller_spec.rb
index 42b791320979c264134e178ef9d653a477f1627e..897ee5151b3133af6b4ec583340c2f4ba93f2d1b 100644
--- a/ee/spec/controllers/admin/push_rules_controller_spec.rb
+++ b/ee/spec/controllers/admin/push_rules_controller_spec.rb
@@ -19,7 +19,7 @@
     it 'updates sample push rule' do
       expect_any_instance_of(PushRule).to receive(:update).with(ActionController::Parameters.new(params).permit!)
 
-      patch :update, push_rule: params
+      patch :update, params: { push_rule: params }
 
       expect(response).to redirect_to(admin_push_rule_path)
     end
@@ -30,7 +30,7 @@
       end
 
       it 'returns 404' do
-        patch :update, push_rule: params
+        patch :update, params: { push_rule: params }
 
         expect(response).to have_gitlab_http_status(404)
       end
diff --git a/ee/spec/controllers/admin/users_controller_spec.rb b/ee/spec/controllers/admin/users_controller_spec.rb
index e5f9bb33ad6ec54f9291d25035374cf253378ae2..88cc8af977b2ada6f74455faf42de6af14f907f7 100644
--- a/ee/spec/controllers/admin/users_controller_spec.rb
+++ b/ee/spec/controllers/admin/users_controller_spec.rb
@@ -9,7 +9,7 @@
   end
 
   describe 'POST #reset_runner_minutes' do
-    subject { post :reset_runners_minutes, id: user }
+    subject { post :reset_runners_minutes, params: { id: user } }
 
     before do
       allow_any_instance_of(ClearNamespaceSharedRunnersMinutesService)
diff --git a/ee/spec/controllers/autocomplete_controller_spec.rb b/ee/spec/controllers/autocomplete_controller_spec.rb
index 1b5a52ff3a16b114f80e655d114dc610a1dcb8a8..b330bdb6c4350da1adc5ff55f137702c03048bcc 100644
--- a/ee/spec/controllers/autocomplete_controller_spec.rb
+++ b/ee/spec/controllers/autocomplete_controller_spec.rb
@@ -16,7 +16,7 @@
 
       describe "GET #users that can push to protected branches" do
         before do
-          get(:users, project_id: project.id, push_code_to_protected_branches: 'true')
+          get(:users, params: { project_id: project.id, push_code_to_protected_branches: 'true' })
         end
 
         it 'returns authorized users', :aggregate_failures do
@@ -31,7 +31,7 @@
 
         before do
           project.add_reporter(reporter_user)
-          get(:users, project_id: project.id, push_code: 'true')
+          get(:users, params: { project_id: project.id, push_code: 'true' })
         end
 
         it 'returns authorized users', :aggregate_failures do
@@ -43,7 +43,7 @@
 
       describe "GET #users that can push to protected branches, including the current user" do
         before do
-          get(:users, project_id: project.id, push_code_to_protected_branches: true, current_user: true)
+          get(:users, params: { project_id: project.id, push_code_to_protected_branches: true, current_user: true })
         end
 
         it 'returns authorized users', :aggregate_failures do
@@ -67,7 +67,7 @@
     context "while fetching all groups belonging to a project" do
       before do
         sign_in(user)
-        get(:project_groups, project_id: project.id)
+        get(:project_groups, params: { project_id: project.id })
       end
 
       it 'returns a single group', :aggregate_failures do
@@ -80,7 +80,7 @@
     context "while fetching all groups belonging to a project the current user cannot access" do
       before do
         sign_in(user2)
-        get(:project_groups, project_id: project.id)
+        get(:project_groups, params: { project_id: project.id })
       end
 
       it { expect(response).to be_not_found }
@@ -89,7 +89,7 @@
     context "while fetching all groups belonging to an invalid project ID" do
       before do
         sign_in(user)
-        get(:project_groups, project_id: 'invalid')
+        get(:project_groups, params: { project_id: 'invalid' })
       end
 
       it { expect(response).to be_not_found }
diff --git a/ee/spec/controllers/boards/issues_controller_spec.rb b/ee/spec/controllers/boards/issues_controller_spec.rb
index a0baf3947141cb4213dfa93c1888e9b27c6e4676..4496b06ab17ef3493638212e777c3cce7e58340f 100644
--- a/ee/spec/controllers/boards/issues_controller_spec.rb
+++ b/ee/spec/controllers/boards/issues_controller_spec.rb
@@ -97,7 +97,7 @@
       end
 
       it 'returns a 403 for group boards' do
-        get :index, board_id: board
+        get :index, params: { board_id: board }
 
         expect(response).to have_gitlab_http_status(403)
       end
@@ -118,7 +118,7 @@ def list_issues(user:, board:, list: nil)
         list_id: list.try(:to_param)
       }
 
-      get :index, params.compact
+      get :index, params: params.compact
     end
   end
 
@@ -184,9 +184,11 @@ def list_issues(user:, board:, list: nil)
     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_1.id },
+      post :create, params: {
+                      board_id: board.to_param,
+                      list_id: list.to_param,
+                      issue: { title: title, project_id: project_1.id }
+                    },
                     format: :json
     end
   end
@@ -245,10 +247,12 @@ def create_issue(user:, board:, list:, title:)
     def move(user:, board:, issue:, from_list_id:, to_list_id:)
       sign_in(user)
 
-      patch :update, board_id: board.to_param,
-                     id: issue.id,
-                     from_list_id: from_list_id,
-                     to_list_id: to_list_id,
+      patch :update, params: {
+                       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/ee/spec/controllers/boards/lists_controller_spec.rb b/ee/spec/controllers/boards/lists_controller_spec.rb
index cb63d5774111576d52831a7d80158e49e8855586..0cc79f9dc93e9bc6fbd9b0747671cc79bc768f53 100644
--- a/ee/spec/controllers/boards/lists_controller_spec.rb
+++ b/ee/spec/controllers/boards/lists_controller_spec.rb
@@ -45,7 +45,7 @@
     def read_board_list(user:, board:)
       sign_in(user)
 
-      get :index, board_id: board.to_param, format: :json
+      get :index, params: { board_id: board.to_param }, format: :json
     end
   end
 
@@ -99,8 +99,10 @@ def read_board_list(user:, board:)
     def create_board_list(user:, board:, label_id:)
       sign_in(user)
 
-      post :create, board_id: board.to_param,
-                    list: { label_id: label_id },
+      post :create, params: {
+                      board_id: board.to_param,
+                      list: { label_id: label_id }
+                    },
                     format: :json
     end
   end
@@ -194,8 +196,10 @@ def move(user:, board:, list:, position:)
     def remove_board_list(user:, board:, list:)
       sign_in(user)
 
-      delete :destroy, board_id: board.to_param,
-                       id: list.to_param,
+      delete :destroy, params: {
+                         board_id: board.to_param,
+                         id: list.to_param
+                       },
                        format: :json
     end
   end
diff --git a/ee/spec/controllers/boards/milestones_controller_spec.rb b/ee/spec/controllers/boards/milestones_controller_spec.rb
index 9276c47df1296976815d079b4efb39e9efd5408f..c81ea1eb6ae936792a7abd43c49bd04d78d2f838 100644
--- a/ee/spec/controllers/boards/milestones_controller_spec.rb
+++ b/ee/spec/controllers/boards/milestones_controller_spec.rb
@@ -15,7 +15,7 @@
       end
 
       it 'returns a list of all milestones of board parent' do
-        get :index, board_id: board.to_param, format: :json
+        get :index, params: { board_id: board.to_param }, format: :json
 
         parsed_response = JSON.parse(response.body)
 
@@ -33,7 +33,7 @@
 
       shared_examples 'unauthorized board milestone listing' do
         it 'returns a forbidden 403 response' do
-          get :index, board_id: board.to_param, format: :json
+          get :index, params: { board_id: board.to_param }, format: :json
 
           expect(response).to have_gitlab_http_status(403)
         end
diff --git a/ee/spec/controllers/boards/users_controller_spec.rb b/ee/spec/controllers/boards/users_controller_spec.rb
index e979eb6e68070455eeef39735637b7725862d4e6..cd909fdd239b689d04366ee7249ed88f763b3210 100644
--- a/ee/spec/controllers/boards/users_controller_spec.rb
+++ b/ee/spec/controllers/boards/users_controller_spec.rb
@@ -16,8 +16,10 @@
       end
 
       it 'returns a list of all members of board parent' do
-        get :index, namespace_id: group.to_param,
-                    board_id: board.to_param,
+        get :index, params: {
+                      namespace_id: group.to_param,
+                      board_id: board.to_param
+                    },
                     format: :json
 
         parsed_response = JSON.parse(response.body)
@@ -36,7 +38,7 @@
 
       shared_examples 'unauthorized board user listing' do
         it 'returns a forbidden 403 response' do
-          get :index, board_id: board.to_param, format: :json
+          get :index, params: { board_id: board.to_param }, format: :json
 
           expect(response).to have_gitlab_http_status(403)
         end
diff --git a/ee/spec/controllers/concerns/ee/project_unauthorized_spec.rb b/ee/spec/controllers/concerns/ee/project_unauthorized_spec.rb
index 156be1da3ec21d2c06081d4ffd62214d0fab321f..e229a0ea062139d59b478a1b364d84d0a3bf9f91 100644
--- a/ee/spec/controllers/concerns/ee/project_unauthorized_spec.rb
+++ b/ee/spec/controllers/concerns/ee/project_unauthorized_spec.rb
@@ -26,7 +26,7 @@ def show
     it 'renders a 200 when the service allows access to the project' do
       external_service_allow_access(user, project)
 
-      get :show, namespace_id: project.namespace.to_param, id: project.to_param
+      get :show, params: { namespace_id: project.namespace.to_param, id: project.to_param }
 
       expect(response).to have_gitlab_http_status(200)
     end
@@ -34,7 +34,7 @@ def show
     it 'renders a 403 when the service denies access to the project' do
       external_service_deny_access(user, project)
 
-      get :show, namespace_id: project.namespace.to_param, id: project.to_param
+      get :show, params: { namespace_id: project.namespace.to_param, id: project.to_param }
 
       expect(response).to have_gitlab_http_status(403)
       expect(response.body).to match("External authorization denied access to this project")
@@ -43,7 +43,7 @@ def show
     it 'renders a 404 when the user cannot see the project at all' do
       other_project = create(:project, :private)
 
-      get :show, namespace_id: other_project.namespace.to_param, id: other_project.to_param
+      get :show, params: { namespace_id: other_project.namespace.to_param, id: other_project.to_param }
 
       expect(response).to have_gitlab_http_status(404)
     end
diff --git a/ee/spec/controllers/ee/projects/autocomplete_sources_controller_spec.rb b/ee/spec/controllers/ee/projects/autocomplete_sources_controller_spec.rb
index de731f03e2e10171e8135f61f40203d869a67114..d81b4c40eb7375a2cc807509997975a7d479f5d3 100644
--- a/ee/spec/controllers/ee/projects/autocomplete_sources_controller_spec.rb
+++ b/ee/spec/controllers/ee/projects/autocomplete_sources_controller_spec.rb
@@ -15,7 +15,7 @@
 
   context 'when epics feture is disabled' do
     it 'returns 404 status' do
-      get :epics, namespace_id: project.namespace, project_id: project
+      get :epics, params: { namespace_id: project.namespace, project_id: project }
 
       expect(response).to have_gitlab_http_status(404)
     end
@@ -28,7 +28,7 @@
 
     context '#epics' do
       it 'returns the correct response' do
-        get :epics, namespace_id: project.namespace, project_id: project
+        get :epics, params: { namespace_id: project.namespace, project_id: project }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response).to be_an(Array)
diff --git a/ee/spec/controllers/ee/sent_notifications_controller_spec.rb b/ee/spec/controllers/ee/sent_notifications_controller_spec.rb
index 79945d8bee873a22251249ba14b8698226f335ae..2da80a63bec0f30f8d87a4ab5244037328c9b9d1 100644
--- a/ee/spec/controllers/ee/sent_notifications_controller_spec.rb
+++ b/ee/spec/controllers/ee/sent_notifications_controller_spec.rb
@@ -13,7 +13,7 @@
 
     before do
       sign_in(user)
-      get(:unsubscribe, id: sent_notification.reply_key)
+      get(:unsubscribe, params: { id: sent_notification.reply_key })
     end
 
     it 'unsubscribes the user' do
diff --git a/ee/spec/controllers/groups/analytics_controller_spec.rb b/ee/spec/controllers/groups/analytics_controller_spec.rb
index afe295cbf0cce9a1a742002248b01ef675bfb36c..b42a995db121a652058c0f6905b0f635732a8a5c 100644
--- a/ee/spec/controllers/groups/analytics_controller_spec.rb
+++ b/ee/spec/controllers/groups/analytics_controller_spec.rb
@@ -41,7 +41,7 @@ def create_push_event(author, project)
   it 'returns 404 when feature is not available and we dont show promotions' do
     stub_licensed_features(contribution_analytics: false)
 
-    get :show, group_id: group.path
+    get :show, params: { group_id: group.path }
 
     expect(response).to have_gitlab_http_status(404)
   end
@@ -56,14 +56,14 @@ def create_push_event(author, project)
     it 'returns page when feature is not available and we show promotions' do
       stub_licensed_features(contribution_analytics: false)
 
-      get :show, group_id: group.path
+      get :show, params: { group_id: group.path }
 
       expect(response).to have_gitlab_http_status(200)
     end
   end
 
   it 'sets instance variables properly', :aggregate_failures do
-    get :show, group_id: group.path
+    get :show, params: { group_id: group.path }
 
     expect(response).to have_gitlab_http_status(200)
 
@@ -78,7 +78,7 @@ def create_push_event(author, project)
   end
 
   it "returns member contributions JSON when format is JSON" do
-    get :show, group_id: group.path, format: :json
+    get :show, params: { group_id: group.path }, format: :json
 
     expect(json_response.length).to eq(3)
 
@@ -96,14 +96,14 @@ def create_push_event(author, project)
 
   it 'does not cause N+1 queries when the format is JSON' do
     control_count = ActiveRecord::QueryRecorder.new do
-      get :show, group_id: group.path, format: :json
+      get :show, params: { group_id: group.path }, format: :json
     end
 
     controller.instance_variable_set(:@group, nil)
     user4 = create(:user)
     group.add_user(user4, GroupMember::DEVELOPER)
 
-    expect { get :show, group_id: group.path, format: :json }
+    expect { get :show, params: { group_id: group.path }, format: :json }
       .not_to exceed_query_limit(control_count)
   end
 
@@ -111,19 +111,19 @@ def create_push_event(author, project)
     render_views
 
     it 'avoids a N+1 query in #show' do
-      control_count = ActiveRecord::QueryRecorder.new { get :show, group_id: group.path }.count
+      control_count = ActiveRecord::QueryRecorder.new { get :show, params: { group_id: group.path } }.count
 
       # Clear out controller state to force a refresh of the group
       controller.instance_variable_set(:@group, nil)
       user4 = create(:user)
       group.add_user(user4, GroupMember::DEVELOPER)
 
-      expect { get :show, group_id: group.path }.not_to exceed_query_limit(control_count)
+      expect { get :show, params: { group_id: group.path } }.not_to exceed_query_limit(control_count)
     end
   end
 
   describe 'GET #index' do
-    subject { get :show, group_id: group.to_param }
+    subject { get :show, params: { group_id: group.to_param } }
 
     it_behaves_like 'disabled when using an external authorization service'
   end
diff --git a/ee/spec/controllers/groups/autocomplete_sources_controller_spec.rb b/ee/spec/controllers/groups/autocomplete_sources_controller_spec.rb
index 5dbd7866b8b085dc82dccffb817689fb0697976d..3d663431a5ef2b041897c1e5b38ed628922c5240 100644
--- a/ee/spec/controllers/groups/autocomplete_sources_controller_spec.rb
+++ b/ee/spec/controllers/groups/autocomplete_sources_controller_spec.rb
@@ -15,13 +15,13 @@
 
   context '#epics' do
     it 'returns 200 status' do
-      get :epics, group_id: group
+      get :epics, params: { group_id: group }
 
       expect(response).to have_gitlab_http_status(200)
     end
 
     it 'returns the correct response' do
-      get :epics, group_id: group
+      get :epics, params: { group_id: group }
 
       expect(json_response).to be_an(Array)
       expect(json_response.first).to include(
@@ -39,7 +39,7 @@
       create(:milestone, group: sub_group)
       group_milestone = create(:milestone, group: group)
 
-      get :milestones, group_id: group
+      get :milestones, params: { group_id: group }
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response.count).to eq(1)
@@ -52,13 +52,13 @@
 
   context '#commands' do
     it 'returns 200 status' do
-      get :commands, group_id: group, type: 'Epic', type_id: epic.iid
+      get :commands, params: { group_id: group, type: 'Epic', type_id: epic.iid }
 
       expect(response).to have_gitlab_http_status(200)
     end
 
     it 'returns the correct response' do
-      get :commands, group_id: group, type: 'Epic', type_id: epic.iid
+      get :commands, params: { group_id: group, type: 'Epic', type_id: epic.iid }
 
       expect(json_response).to be_an(Array)
       expect(json_response).to include(
diff --git a/ee/spec/controllers/groups/avatars_controller_spec.rb b/ee/spec/controllers/groups/avatars_controller_spec.rb
index 697f3bca6e9eb6c3f3f09871dc1fea649b171327..a59e1cc145c2662f3db0712c7b127887ffffc482 100644
--- a/ee/spec/controllers/groups/avatars_controller_spec.rb
+++ b/ee/spec/controllers/groups/avatars_controller_spec.rb
@@ -14,7 +14,7 @@
   it 'works when external authorization service is enabled' do
     enable_external_authorization_service_check
 
-    delete :destroy, group_id: group
+    delete :destroy, params: { group_id: group }
 
     expect(response).to have_gitlab_http_status(302)
   end
diff --git a/ee/spec/controllers/groups/billings_controller_spec.rb b/ee/spec/controllers/groups/billings_controller_spec.rb
index 440146040c011914ae07763caa65b1e21fe91a6f..cf42bea2adf57b39bd5d29c68602d2ebd7d38cea 100644
--- a/ee/spec/controllers/groups/billings_controller_spec.rb
+++ b/ee/spec/controllers/groups/billings_controller_spec.rb
@@ -19,7 +19,7 @@
       it 'renders index with 200 status code' do
         allow_any_instance_of(FetchSubscriptionPlansService).to receive(:execute)
 
-        get :index, group_id: group
+        get :index, params: { group_id: group }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to render_template(:index)
@@ -29,7 +29,7 @@
         data = double
         expect_any_instance_of(FetchSubscriptionPlansService).to receive(:execute).and_return(data)
 
-        get :index, group_id: group
+        get :index, params: { group_id: group }
 
         expect(assigns(:plans_data)).to eq(data)
       end
@@ -40,7 +40,7 @@
         group.add_developer(user)
         sign_in(user)
 
-        get :index, group_id: group.id
+        get :index, params: { group_id: group.id }
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -50,7 +50,7 @@
         group.add_owner(user)
         sign_in(user)
 
-        get :index, group_id: group
+        get :index, params: { group_id: group }
 
         expect(response).to have_gitlab_http_status(404)
       end
diff --git a/ee/spec/controllers/groups/boards_controller_spec.rb b/ee/spec/controllers/groups/boards_controller_spec.rb
index 0ba70cbab67904b27812ad85b9806d14df3899b2..39ea80b954fbefe69ac2bfc270237bc49bc0c988 100644
--- a/ee/spec/controllers/groups/boards_controller_spec.rb
+++ b/ee/spec/controllers/groups/boards_controller_spec.rb
@@ -48,7 +48,7 @@
     end
 
     def list_boards(format: :html)
-      get :index, group_id: group, format: format
+      get :index, params: { group_id: group }, format: format
     end
   end
 
diff --git a/ee/spec/controllers/groups/children_controller_spec.rb b/ee/spec/controllers/groups/children_controller_spec.rb
index 75427bfb0ca4293682a9097a3bea9009bda4c979..bf6a5327e66cf7a08f77c6a893fcd0244535a79c 100644
--- a/ee/spec/controllers/groups/children_controller_spec.rb
+++ b/ee/spec/controllers/groups/children_controller_spec.rb
@@ -14,7 +14,7 @@
   it 'works when external authorization service is enabled' do
     enable_external_authorization_service_check
 
-    get :index, group_id: group, format: :json
+    get :index, params: { group_id: group }, format: :json
 
     expect(response).to have_gitlab_http_status(200)
   end
diff --git a/ee/spec/controllers/groups/epic_issues_controller_spec.rb b/ee/spec/controllers/groups/epic_issues_controller_spec.rb
index c1712dd2c765e32b50bb374e3db178413036bdbc..3b660445aa05d489292ec701be89d415f243f5d2 100644
--- a/ee/spec/controllers/groups/epic_issues_controller_spec.rb
+++ b/ee/spec/controllers/groups/epic_issues_controller_spec.rb
@@ -30,7 +30,7 @@
   describe 'GET #index' do
     let!(:epic_issue) { create(:epic_issue, epic: epic, issue: issue) }
 
-    subject { get :index, group_id: group, epic_id: epic.to_param }
+    subject { get :index, params: { group_id: group, epic_id: epic.to_param } }
 
     it_behaves_like 'unlicensed epics action'
 
@@ -55,7 +55,7 @@
     subject do
       reference = [issue.to_reference(full: true)]
 
-      post :create, group_id: group, epic_id: epic.to_param, issuable_references: reference
+      post :create, params: { group_id: group, epic_id: epic.to_param, issuable_references: reference }
     end
 
     it_behaves_like 'unlicensed epics action'
@@ -96,7 +96,7 @@
   describe 'DELETE #destroy' do
     let!(:epic_issue) { create(:epic_issue, epic: epic, issue: issue) }
 
-    subject { delete :destroy, group_id: group, epic_id: epic.to_param, id: epic_issue.id }
+    subject { delete :destroy, params: { group_id: group, epic_id: epic.to_param, id: epic_issue.id } }
 
     it_behaves_like 'unlicensed epics action'
 
@@ -131,7 +131,7 @@
 
       context 'when the epic from the association does not equal epic from the path' do
         subject do
-          delete :destroy, group_id: group, epic_id: another_epic.to_param, id: epic_issue.id
+          delete :destroy, params: { group_id: group, epic_id: another_epic.to_param, id: epic_issue.id }
         end
 
         let(:another_epic) { create(:epic, group: group) }
@@ -153,7 +153,7 @@
 
       context 'when the epic_issue record does not exists' do
         it 'returns status 404' do
-          delete :destroy, group_id: group, epic_id: epic.to_param, id: 9999
+          delete :destroy, params: { group_id: group, epic_id: epic.to_param, id: 9999 }
 
           expect(response.status).to eq(403)
         end
@@ -167,7 +167,7 @@
     let!(:epic_issue2) { create(:epic_issue, epic: epic, issue: issue2, relative_position: 2) }
 
     subject do
-      put :update, group_id: group, epic_id: epic.to_param, id: epic_issue1.id, epic: { move_before_id: epic_issue2.id }
+      put :update, params: { group_id: group, epic_id: epic.to_param, id: epic_issue1.id, epic: { move_before_id: epic_issue2.id } }
     end
 
     it_behaves_like 'unlicensed epics action'
@@ -199,7 +199,7 @@
 
       context 'when the epic from the association does not equal epic from the path' do
         subject do
-          put :update, group_id: group, epic_id: another_epic.to_param, id: epic_issue1.id, epic: { after_move_id: epic_issue1.id }
+          put :update, params: { group_id: group, epic_id: another_epic.to_param, id: epic_issue1.id, epic: { after_move_id: epic_issue1.id } }
         end
 
         let(:another_epic) { create(:epic, group: group) }
@@ -217,7 +217,7 @@
 
       context 'when the epic_issue record does not exists' do
         it 'returns status 404' do
-          delete :destroy, group_id: group, epic_id: epic.to_param, id: 9999
+          delete :destroy, params: { group_id: group, epic_id: epic.to_param, id: 9999 }
 
           expect(response.status).to eq(403)
         end
diff --git a/ee/spec/controllers/groups/epics/notes_controller_spec.rb b/ee/spec/controllers/groups/epics/notes_controller_spec.rb
index 23774142f399612b65a7f1e71710c78a88f72a78..ee0a58a0c36ffddac813067e98b81a4df54043d8 100644
--- a/ee/spec/controllers/groups/epics/notes_controller_spec.rb
+++ b/ee/spec/controllers/groups/epics/notes_controller_spec.rb
@@ -29,7 +29,7 @@
     end
 
     it 'responds with array of notes' do
-      get :index, request_params
+      get :index, params: request_params
 
       expect(parsed_response[:notes]).to be_an Array
       expect(parsed_response[:notes].count).to eq(1)
@@ -39,7 +39,7 @@
       it "does not return any note" do
         expect_any_instance_of(Note).to receive(:cross_reference_not_visible_for?).and_return(true)
 
-        get :index, request_params
+        get :index, params: request_params
 
         expect(parsed_response[:notes].count).to eq(0)
       end
@@ -62,13 +62,13 @@
     end
 
     it "returns status 302 for html" do
-      post :create, request_params.merge(format: :html)
+      post :create, params: request_params.merge(format: :html)
 
       expect(response).to have_gitlab_http_status(302)
     end
 
     it "returns status 200 for json" do
-      post :create, request_params
+      post :create, params: request_params
 
       expect(response).to have_gitlab_http_status(200)
       expect(parsed_response[:id]).not_to be_nil
@@ -91,7 +91,7 @@
     end
 
     it "updates the note" do
-      expect { put :update, request_params }.to change { note.reload.note }
+      expect { put :update, params: request_params }.to change { note.reload.note }
     end
   end
 
@@ -115,13 +115,13 @@
       end
 
       it "returns status 200" do
-        delete :destroy, request_params
+        delete :destroy, params: request_params
 
         expect(response).to have_gitlab_http_status(200)
       end
 
       it "deletes the note" do
-        expect { delete :destroy, request_params }.to change { Note.count }.from(1).to(0)
+        expect { delete :destroy, params: request_params }.to change { Note.count }.from(1).to(0)
       end
     end
 
@@ -131,7 +131,7 @@
       end
 
       it "returns status 404" do
-        delete :destroy, request_params
+        delete :destroy, params: request_params
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -154,17 +154,17 @@
 
     it "toggles the award emoji" do
       expect do
-        post(:toggle_award_emoji, request_params.merge(name: "thumbsup"))
+        post(:toggle_award_emoji, params: request_params.merge(name: "thumbsup"))
       end.to change { note.award_emoji.count }.by(1)
 
       expect(response).to have_gitlab_http_status(200)
     end
 
     it "removes the already awarded emoji" do
-      post(:toggle_award_emoji, request_params.merge(name: "thumbsup"))
+      post(:toggle_award_emoji, params: request_params.merge(name: "thumbsup"))
 
       expect do
-        post(:toggle_award_emoji, request_params.merge(name: "thumbsup"))
+        post(:toggle_award_emoji, params: request_params.merge(name: "thumbsup"))
       end.to change { AwardEmoji.count }.by(-1)
 
       expect(response).to have_gitlab_http_status(200)
diff --git a/ee/spec/controllers/groups/epics_controller_spec.rb b/ee/spec/controllers/groups/epics_controller_spec.rb
index 0cf5eafb1822640664d51ce4a53bf70f44b136be..c14f51a4e4a9ecfd7723e06b07b68b3771715117 100644
--- a/ee/spec/controllers/groups/epics_controller_spec.rb
+++ b/ee/spec/controllers/groups/epics_controller_spec.rb
@@ -20,19 +20,19 @@
     end
 
     describe 'GET #index' do
-      subject { get :index, group_id: group }
+      subject { get :index, params: { group_id: group } }
 
       it_behaves_like '404 status'
     end
 
     describe 'GET #show' do
-      subject { get :show, group_id: group, id: epic.to_param }
+      subject { get :show, params: { group_id: group, id: epic.to_param } }
 
       it_behaves_like '404 status'
     end
 
     describe 'PUT #update' do
-      subject { put :update, group_id: group, id: epic.to_param }
+      subject { put :update, params: { group_id: group, id: epic.to_param } }
 
       it_behaves_like '404 status'
     end
@@ -52,7 +52,7 @@
       end
 
       it "returns index" do
-        get :index, group_id: group
+        get :index, params: { group_id: group }
 
         expect(response).to have_gitlab_http_status(200)
       end
@@ -62,7 +62,7 @@
           group.update!(visibility_level: Gitlab::VisibilityLevel::PUBLIC)
           sign_out(user)
 
-          get :index, group_id: group, sort: 'start_date_asc'
+          get :index, params: { group_id: group, sort: 'start_date_asc' }
 
           expect(cookies['epic_sort']).to eq('start_date_asc')
           expect(response).to have_gitlab_http_status(200)
@@ -72,7 +72,7 @@
       context 'when there is a logged in user' do
         context 'when epics_sort is nil' do
           it 'stores sorting param in user preferences' do
-            get :index, group_id: group, sort: 'start_date_asc'
+            get :index, params: { group_id: group, sort: 'start_date_asc' }
 
             expect(user.user_preference.epics_sort).to eq('start_date_asc')
             expect(response).to have_gitlab_http_status(200)
@@ -83,7 +83,7 @@
           it 'update epics_sort with current value' do
             user.user_preference.update(epics_sort: 'created_desc')
 
-            get :index, group_id: group, sort: 'start_date_asc'
+            get :index, params: { group_id: group, sort: 'start_date_asc' }
 
             expect(user.reload.user_preference.epics_sort).to eq('start_date_asc')
             expect(response).to have_gitlab_http_status(200)
@@ -99,20 +99,20 @@
         end
 
         it 'redirects to last_page if page number is larger than number of pages' do
-          get :index, group_id: group, page: (last_page + 1).to_param
+          get :index, params: { group_id: group, page: (last_page + 1).to_param }
 
           expect(response).to redirect_to(group_epics_path(page: last_page, state: controller.params[:state], scope: controller.params[:scope]))
         end
 
         it 'renders the specified page' do
-          get :index, group_id: group, page: last_page.to_param
+          get :index, params: { group_id: group, page: last_page.to_param }
 
           expect(assigns(:epics).current_page).to eq(last_page)
           expect(response).to have_gitlab_http_status(200)
         end
 
         it_behaves_like 'disabled when using an external authorization service' do
-          subject { get :index, group_id: group }
+          subject { get :index, params: { group_id: group } }
         end
       end
 
@@ -122,7 +122,7 @@
         end
 
         def list_epics
-          get :index, group_id: group, format: :json
+          get :index, params: { group_id: group }, format: :json
         end
 
         it 'returns a list of epics' do
@@ -153,7 +153,7 @@ def list_epics
           let!(:labeled_epic) { create(:labeled_epic, group: group, labels: [label]) }
 
           it 'returns all epics with given label' do
-            get :index, group_id: group, label_name: label.title, format: :json
+            get :index, params: { group_id: group, label_name: label.title }, format: :json
 
             expect(json_response.size).to eq(1)
             expect(json_response.first['id']).to eq(labeled_epic.id)
@@ -174,7 +174,7 @@ def list_epics
           let(:issue) { create(:issue, project: project, description: "Project Issue") }
 
           it 'the link to the issue is included' do
-            get :discussions, group_id: group, id: epic.to_param
+            get :discussions, params: { group_id: group, id: epic.to_param }
 
             expect(response).to have_gitlab_http_status(200)
             expect(json_response.size).to eq(1)
@@ -201,7 +201,7 @@ def list_epics
 
     describe 'GET #show' do
       def show_epic(format = :html)
-        get :show, group_id: group, id: epic.to_param, format: format
+        get :show, params: { group_id: group, id: epic.to_param }, format: format
       end
 
       context 'when format is HTML' do
@@ -316,12 +316,12 @@ def show_epic(format = :html)
       end
 
       def update_epic(epic, params)
-        put :update, group_id: epic.group.to_param, id: epic.to_param, epic: params, format: :json
+        put :update, params: { group_id: epic.group.to_param, id: epic.to_param, epic: params }, format: :json
       end
     end
 
     describe 'GET #realtime_changes' do
-      subject { get :realtime_changes, group_id: group, id: epic.to_param }
+      subject { get :realtime_changes, params: { group_id: group, id: epic.to_param } }
 
       it 'returns epic' do
         group.add_developer(user)
@@ -348,7 +348,7 @@ def update_epic(epic, params)
 
     describe '#create' do
       subject do
-        post :create, group_id: group, epic: { title: 'new epic', description: 'some descripition', label_ids: [label.id] }
+        post :create, params: { group_id: group, epic: { title: 'new epic', description: 'some descripition', label_ids: [label.id] } }
       end
 
       context 'when user has permissions to create an epic' do
@@ -382,7 +382,7 @@ def update_epic(epic, params)
 
         context 'when required parameter is missing' do
           before do
-            post :create, group_id: group, epic: { description: 'some descripition' }
+            post :create, params: { group_id: group, epic: { description: 'some descripition' } }
           end
 
           it 'returns 422 response' do
@@ -412,14 +412,14 @@ def update_epic(epic, params)
 
       it "rejects a developer to destroy an epic" do
         group.add_developer(user)
-        delete :destroy, group_id: group, id: epic.to_param
+        delete :destroy, params: { group_id: group, id: epic.to_param }
 
         expect(response).to have_gitlab_http_status(404)
       end
 
       it "deletes the epic" do
         group.add_owner(user)
-        delete :destroy, group_id: group, id: epic.to_param
+        delete :destroy, params: { group_id: group, id: epic.to_param }
 
         expect(response).to have_gitlab_http_status(302)
         expect(controller).to set_flash[:notice].to(/The epic was successfully deleted\./)
diff --git a/ee/spec/controllers/groups/group_members_controller_spec.rb b/ee/spec/controllers/groups/group_members_controller_spec.rb
index 2c08c2d1c22e75761186a0943ec9bbb702e31f11..601fa8b3bfeef18a98924a369b734a9390742563 100644
--- a/ee/spec/controllers/groups/group_members_controller_spec.rb
+++ b/ee/spec/controllers/groups/group_members_controller_spec.rb
@@ -19,7 +19,7 @@
 
     describe 'GET #index' do
       it 'is successful' do
-        get :index, group_id: group
+        get :index, params: { group_id: group }
 
         expect(response).to have_gitlab_http_status(200)
       end
@@ -27,7 +27,7 @@
 
     describe 'POST #create' do
       it 'is successful' do
-        post :create, group_id: group, users: user, access_level: Gitlab::Access::GUEST
+        post :create, params: { group_id: group, users: user, access_level: Gitlab::Access::GUEST }
 
         expect(response).to have_gitlab_http_status(302)
       end
@@ -36,9 +36,11 @@
     describe 'PUT #update' do
       it 'is successful' do
         put :update,
-            group_member: { access_level: Gitlab::Access::GUEST },
-            group_id: group,
-            id: membership,
+            params: {
+              group_member: { access_level: Gitlab::Access::GUEST },
+              group_id: group,
+              id: membership
+            },
             format: :js
 
         expect(response).to have_gitlab_http_status(200)
@@ -47,7 +49,7 @@
 
     describe 'DELETE #destroy' do
       it 'is successful' do
-        delete :destroy, group_id: group, id: membership
+        delete :destroy, params: { group_id: group, id: membership }
 
         expect(response).to have_gitlab_http_status(302)
       end
@@ -57,7 +59,7 @@
       it 'is successful' do
         sign_in(create(:user))
 
-        post :request_access, group_id: group
+        post :request_access, params: { group_id: group }
 
         expect(response).to have_gitlab_http_status(302)
       end
@@ -66,7 +68,7 @@
     describe 'POST #approve_request_access' do
       it 'is successful' do
         access_request = create(:group_member, :access_request, group: group)
-        post :approve_access_request, group_id: group, id: access_request
+        post :approve_access_request, params: { group_id: group, id: access_request }
 
         expect(response).to have_gitlab_http_status(302)
       end
@@ -76,7 +78,7 @@
       it 'is successful' do
         group.add_owner(create(:user))
 
-        delete :leave, group_id: group
+        delete :leave, params: { group_id: group }
 
         expect(response).to have_gitlab_http_status(302)
       end
@@ -84,7 +86,7 @@
 
     describe 'POST #resend_invite' do
       it 'is successful' do
-        post :resend_invite, group_id: group, id: membership
+        post :resend_invite, params: { group_id: group, id: membership }
 
         expect(response).to have_gitlab_http_status(302)
       end
@@ -98,9 +100,11 @@
         allow(Ability).to receive(:allowed?).with(user, :override_group_member, membership) { true }
 
         post :override,
-             group_id: group,
-             id: membership,
-             group_member: { override: true },
+             params: {
+               group_id: group,
+               id: membership,
+               group_member: { override: true }
+             },
              format: :js
 
         expect(response).to have_gitlab_http_status(200)
diff --git a/ee/spec/controllers/groups/groups_controller_spec.rb b/ee/spec/controllers/groups/groups_controller_spec.rb
index 738537c9aedaac4c81267917a4c7db7d5d302d21..3044a9124b63a757b8ebdc37a8705a859b4503e7 100644
--- a/ee/spec/controllers/groups/groups_controller_spec.rb
+++ b/ee/spec/controllers/groups/groups_controller_spec.rb
@@ -18,13 +18,13 @@
 
     describe 'GET #show' do
       it 'is successful' do
-        get :show, id: group.to_param
+        get :show, params: { id: group.to_param }
 
         expect(response).to have_gitlab_http_status(200)
       end
 
       it 'does not allow other formats' do
-        get :show, id: group.to_param, format: :atom
+        get :show, params: { id: group.to_param }, format: :atom
 
         expect(response).to have_gitlab_http_status(403)
       end
@@ -32,7 +32,7 @@
 
     describe 'GET #edit' do
       it 'is successful' do
-        get :edit, id: group.to_param
+        get :edit, params: { id: group.to_param }
 
         expect(response).to have_gitlab_http_status(200)
       end
@@ -58,7 +58,7 @@
     describe 'POST #create' do
       it 'creates a group' do
         expect do
-          post :create, group: { name: 'a name', path: 'a-name' }
+          post :create, params: { group: { name: 'a name', path: 'a-name' } }
         end.to change { Group.count }.by(1)
       end
     end
@@ -66,7 +66,7 @@
     describe 'PUT #update' do
       it 'updates a group' do
         expect do
-          put :update, id: group.to_param, group: { name: 'world' }
+          put :update, params: { id: group.to_param, group: { name: 'world' } }
         end.to change { group.reload.name }
       end
 
@@ -77,7 +77,7 @@
           stub_licensed_features(custom_file_templates_for_namespace: false)
 
           expect do
-            post :update, id: group.to_param, group: { file_template_project_id: project.id }
+            post :update, params: { id: group.to_param, group: { file_template_project_id: project.id } }
           end.not_to change { group.reload.file_template_project_id }
         end
       end
@@ -89,7 +89,7 @@
           stub_licensed_features(custom_file_templates_for_namespace: true)
 
           expect do
-            post :update, id: group.to_param, group: { file_template_project_id: project.id }
+            post :update, params: { id: group.to_param, group: { file_template_project_id: project.id } }
           end.to change { group.reload.file_template_project_id }.to(project.id)
         end
       end
@@ -97,7 +97,7 @@
 
     describe 'DELETE #destroy' do
       it 'deletes the group' do
-        delete :destroy, id: group.to_param
+        delete :destroy, params: { id: group.to_param }
 
         expect(response).to have_gitlab_http_status(302)
       end
@@ -105,19 +105,19 @@
   end
 
   describe 'GET #activity' do
-    subject { get :activity, id: group.to_param }
+    subject { get :activity, params: { id: group.to_param } }
 
     it_behaves_like 'disabled when using an external authorization service'
   end
 
   describe 'GET #issues' do
-    subject { get :issues, id: group.to_param }
+    subject { get :issues, params: { id: group.to_param } }
 
     it_behaves_like 'disabled when using an external authorization service'
   end
 
   describe 'GET #merge_requests' do
-    subject { get :merge_requests, id: group.to_param }
+    subject { get :merge_requests, params: { id: group.to_param } }
 
     it_behaves_like 'disabled when using an external authorization service'
   end
diff --git a/ee/spec/controllers/groups/hooks_controller_spec.rb b/ee/spec/controllers/groups/hooks_controller_spec.rb
index 817dadccb030f8c4d77117996c5d4cfeba94fcdd..3ae5bea945ee88b7a1365c5f0ac0e0d8d6411ef3 100644
--- a/ee/spec/controllers/groups/hooks_controller_spec.rb
+++ b/ee/spec/controllers/groups/hooks_controller_spec.rb
@@ -16,7 +16,7 @@
 
     describe 'GET #index' do
       it 'is successfull' do
-        get :index, group_id: group.to_param
+        get :index, params: { group_id: group.to_param }
 
         expect(response).to have_gitlab_http_status(200)
       end
@@ -39,7 +39,7 @@
           wiki_page_events: true
         }
 
-        post :create, group_id: group.to_param, hook: hook_params
+        post :create, params: { group_id: group.to_param, hook: hook_params }
 
         expect(response).to have_gitlab_http_status(302)
         expect(group.hooks.size).to eq(1)
@@ -55,7 +55,7 @@
 
     describe 'GET #index' do
       it 'renders a 404' do
-        get :index, group_id: group.to_param
+        get :index, params: { group_id: group.to_param }
 
         expect(response).to have_gitlab_http_status(404)
       end
diff --git a/ee/spec/controllers/groups/issues_analytics_controller_spec.rb b/ee/spec/controllers/groups/issues_analytics_controller_spec.rb
index 56b1c6703071b27ac5332c7c05aa89b24691e6d1..deab548700cda86ad8cbcbe0ee2ba564cd980f4f 100644
--- a/ee/spec/controllers/groups/issues_analytics_controller_spec.rb
+++ b/ee/spec/controllers/groups/issues_analytics_controller_spec.rb
@@ -16,7 +16,7 @@
   describe 'GET #show' do
     context 'when issues analytics is not available for license' do
       it 'renders 404' do
-        get :show, group_id: group.to_param
+        get :show, params: { group_id: group.to_param }
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -30,7 +30,7 @@
       end
 
       it 'renders 404' do
-        get :show, group_id: group.to_param
+        get :show, params: { group_id: group.to_param }
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -43,7 +43,7 @@
 
       context 'as HTML' do
         it 'renders show template' do
-          get :show, group_id: group.to_param, months_back: 2
+          get :show, params: { group_id: group.to_param, months_back: 2 }
 
           expect(response).to render_template(:show)
         end
@@ -56,7 +56,7 @@
         it 'renders chart data as JSON' do
           expected_result = { issue1.created_at.strftime(IssuablesAnalytics::DATE_FORMAT) => 2 }
 
-          get :show, group_id: group.to_param, format: :json
+          get :show, params: { group_id: group.to_param }, format: :json
 
           expect(JSON.parse(response.body)).to include(expected_result)
         end
@@ -72,7 +72,7 @@
           it 'does not count issues which user cannot view' do
             expected_result = { issue1.created_at.strftime(IssuablesAnalytics::DATE_FORMAT) => 1 }
 
-            get :show, group_id: group.to_param, format: :json
+            get :show, params: { group_id: group.to_param }, format: :json
 
             expect(JSON.parse(response.body)).to include(expected_result)
           end
diff --git a/ee/spec/controllers/groups/labels_controller_spec.rb b/ee/spec/controllers/groups/labels_controller_spec.rb
index ea537ef19356f51a8fbd982f6cb044b2d567c560..efb038089d07eaaa9a0d6bce892e7557f859c8d1 100644
--- a/ee/spec/controllers/groups/labels_controller_spec.rb
+++ b/ee/spec/controllers/groups/labels_controller_spec.rb
@@ -11,7 +11,7 @@
   end
 
   describe 'GET #index' do
-    subject { get :index, group_id: group.to_param }
+    subject { get :index, params: { group_id: group.to_param } }
 
     it_behaves_like 'disabled when using an external authorization service'
   end
diff --git a/ee/spec/controllers/groups/milestones_controller_spec.rb b/ee/spec/controllers/groups/milestones_controller_spec.rb
index 8cb7ef57ae4302fac0ef980906fce9bc495e302c..89225a53132d644694bc425051839a91065ae70a 100644
--- a/ee/spec/controllers/groups/milestones_controller_spec.rb
+++ b/ee/spec/controllers/groups/milestones_controller_spec.rb
@@ -11,7 +11,7 @@
   end
 
   describe 'GET #index' do
-    subject { get :index, group_id: group.to_param }
+    subject { get :index, params: { group_id: group.to_param } }
 
     it_behaves_like 'disabled when using an external authorization service'
   end
diff --git a/ee/spec/controllers/groups/omniauth_callbacks_controller_spec.rb b/ee/spec/controllers/groups/omniauth_callbacks_controller_spec.rb
index ec98f4721fc493a88c82bd39bf89ee37e88b31e5..cdeaf176b59d8f293ac9020f0834ce2e96a1786a 100644
--- a/ee/spec/controllers/groups/omniauth_callbacks_controller_spec.rb
+++ b/ee/spec/controllers/groups/omniauth_callbacks_controller_spec.rb
@@ -23,7 +23,7 @@ def linked_accounts
       sign_in(user)
 
       expect do
-        post provider, group_id: group
+        post provider, params: { group_id: group }
       end.to raise_error(AbstractController::ActionNotFound)
     end
   end
@@ -43,24 +43,24 @@ def linked_accounts
         let(:user) { create(:omniauth_user, extern_uid: uid, provider: provider, saml_provider: saml_provider) }
 
         it "redirects to RelayState" do
-          post provider, group_id: group, RelayState: '/explore'
+          post provider, params: { group_id: group, RelayState: '/explore' }
 
           expect(response).to redirect_to('/explore')
         end
 
         it "displays a flash message verifying group sign in" do
-          post provider, group_id: group
+          post provider, params: { group_id: group }
 
           expect(flash[:notice]).to start_with "Signed in with SAML"
         end
 
         it 'uses existing linked identity' do
-          expect { post provider, group_id: group }.not_to change(linked_accounts, :count)
+          expect { post provider, params: { group_id: group } }.not_to change(linked_accounts, :count)
         end
 
         it 'skips authenticity token based forgery protection' do
           with_forgery_protection do
-            post provider, group_id: group
+            post provider, params: { group_id: group }
 
             expect(response).not_to be_client_error
             expect(response).not_to be_server_error
@@ -74,7 +74,7 @@ def linked_accounts
         end
 
         it 'displays warning to user' do
-          post provider, group_id: group
+          post provider, params: { group_id: group }
 
           expect(flash[:notice]).to match(/has already been taken*/)
         end
@@ -82,19 +82,19 @@ def linked_accounts
 
       context "and identity hasn't been linked" do
         it "links the identity" do
-          post provider, group_id: group
+          post provider, params: { group_id: group }
 
           expect(group).to be_member(user)
         end
 
         it "redirects to RelayState" do
-          post provider, group_id: group, RelayState: '/explore'
+          post provider, params: { group_id: group, RelayState: '/explore' }
 
           expect(response).to redirect_to('/explore')
         end
 
         it "displays a flash indicating the account has been linked" do
-          post provider, group_id: group
+          post provider, params: { group_id: group }
 
           expect(flash[:notice]).to match(/SAML for .* was added/)
         end
@@ -103,13 +103,13 @@ def linked_accounts
 
     context "when not signed in" do
       it "redirects to sign in page" do
-        post provider, group_id: group
+        post provider, params: { group_id: group }
 
         expect(response).to redirect_to(new_user_session_path)
       end
 
       it "informs users that they need to sign in to the GitLab instance first" do
-        post provider, group_id: group
+        post provider, params: { group_id: group }
 
         expect(flash[:notice]).to start_with("You must be signed in")
       end
@@ -140,14 +140,14 @@ def stub_certificate_error
     context "not signed in" do
       it "doesn't disclose group existence" do
         expect do
-          post :failure, group_id: group
+          post :failure, params: { group_id: group }
         end.to raise_error(ActionController::RoutingError)
       end
 
       context "group doesn't exist" do
         it "doesn't disclose group non-existence" do
           expect do
-            post :failure, group_id: 'not-a-group'
+            post :failure, params: { group_id: 'not-a-group' }
           end.to raise_error(ActionController::RoutingError)
         end
       end
@@ -159,14 +159,14 @@ def stub_certificate_error
       end
 
       it "has descriptive error flash" do
-        post :failure, group_id: group
+        post :failure, params: { group_id: group }
 
         expect(flash[:alert]).to start_with("Unable to sign you in to the group with SAML due to")
         expect(flash[:alert]).to include("Fingerprint mismatch")
       end
 
       it "redirects back go the SSO page" do
-        post :failure, group_id: group
+        post :failure, params: { group_id: group }
 
         expect(response).to redirect_to(sso_group_saml_providers_path)
       end
@@ -179,7 +179,7 @@ def stub_certificate_error
       end
 
       it "redirects to the settings page" do
-        post :failure, group_id: group
+        post :failure, params: { group_id: group }
 
         expect(response).to redirect_to(group_saml_providers_path)
       end
diff --git a/ee/spec/controllers/groups/roadmap_controller_spec.rb b/ee/spec/controllers/groups/roadmap_controller_spec.rb
index e0d5147cf027ba4195c349584a8d08b68dc6d931..a18c806569d6b0de27514f40b81de94d94877e54 100644
--- a/ee/spec/controllers/groups/roadmap_controller_spec.rb
+++ b/ee/spec/controllers/groups/roadmap_controller_spec.rb
@@ -14,7 +14,7 @@
 
     context 'when epics feature is disabled' do
       it "returns 404 status" do
-        get :show, group_id: group
+        get :show, params: { group_id: group }
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -26,7 +26,7 @@
       end
 
       it "returns 200 status" do
-        get :show, group_id: group
+        get :show, params: { group_id: group }
 
         expect(response).to have_gitlab_http_status(200)
       end
@@ -36,7 +36,7 @@
           group.update!(visibility_level: Gitlab::VisibilityLevel::PUBLIC)
           sign_out(user)
 
-          get :show, group_id: group, sort: 'start_date_asc'
+          get :show, params: { group_id: group, sort: 'start_date_asc' }
 
           expect(cookies['epic_sort']).to eq('start_date_asc')
           expect(response).to have_gitlab_http_status(200)
@@ -46,7 +46,7 @@
       context 'when there is a user logged in' do
         context 'when epics_sort is nil' do
           it 'stores epics sorting param in user preference' do
-            get :show, group_id: group, sort: 'start_date_asc'
+            get :show, params: { group_id: group, sort: 'start_date_asc' }
 
             expect(response).to have_gitlab_http_status(200)
             expect(user.reload.user_preference.epics_sort).to eq('start_date_asc')
@@ -57,7 +57,7 @@
           it 'update epics_sort with current value' do
             user.user_preference.update(epics_sort: 'created_desc')
 
-            get :show, group_id: group, sort: 'start_date_asc'
+            get :show, params: { group_id: group, sort: 'start_date_asc' }
 
             expect(user.reload.user_preference.epics_sort).to eq('start_date_asc')
             expect(response).to have_gitlab_http_status(200)
diff --git a/ee/spec/controllers/groups/saml_providers_controller_spec.rb b/ee/spec/controllers/groups/saml_providers_controller_spec.rb
index 38086ad7e26d3d91fba60d89fb3cecda84894137..419066199056b065fae67240b02336a28fa08a9d 100644
--- a/ee/spec/controllers/groups/saml_providers_controller_spec.rb
+++ b/ee/spec/controllers/groups/saml_providers_controller_spec.rb
@@ -26,19 +26,19 @@ def stub_saml_config(enabled:)
 
   shared_examples 'configuration is prevented' do
     describe 'GET #show' do
-      subject { get :show, group_id: group }
+      subject { get :show, params: { group_id: group } }
 
       it_behaves_like '404 status'
     end
 
     describe 'POST #create' do
-      subject { post :create, group_id: group, saml_provider: { enabled: 'false' } }
+      subject { post :create, params: { group_id: group, saml_provider: { enabled: 'false' } } }
 
       it_behaves_like '404 status'
     end
 
     describe 'PUT #update' do
-      subject { put :update, group_id: group, saml_provider: { enabled: 'false' } }
+      subject { put :update, params: { group_id: group, saml_provider: { enabled: 'false' } } }
 
       it_behaves_like '404 status'
     end
@@ -69,7 +69,7 @@ def stub_saml_config(enabled:)
     end
 
     describe 'GET #show' do
-      subject { get :show, group_id: group }
+      subject { get :show, params: { group_id: group } }
 
       it 'shows configuration page' do
         group.add_owner(user)
diff --git a/ee/spec/controllers/groups/security/vulnerabilities_controller_spec.rb b/ee/spec/controllers/groups/security/vulnerabilities_controller_spec.rb
index 02b0351f48fc5524e6b92c61755335f0f9c1d575..703916fec0c10b96fb5836a325551d73df166dee 100644
--- a/ee/spec/controllers/groups/security/vulnerabilities_controller_spec.rb
+++ b/ee/spec/controllers/groups/security/vulnerabilities_controller_spec.rb
@@ -16,7 +16,7 @@
   end
 
   describe 'GET index.json' do
-    subject { get :index, group_id: group, format: :json }
+    subject { get :index, params: { group_id: group }, format: :json }
 
     context 'when security dashboard feature is disabled' do
       before do
@@ -77,7 +77,7 @@
           end
 
           it "returns a list of vulnerabilities" do
-            get :index, group_id: group, page: 3, format: :json
+            get :index, params: { group_id: group, page: 3 }, format: :json
 
             expect(response).to have_gitlab_http_status(200)
             expect(json_response).to be_an(Array)
@@ -99,7 +99,7 @@
           private
 
           def get_summary
-            get :index, group_id: group, format: :json
+            get :index, params: { group_id: group }, format: :json
           end
         end
 
@@ -148,7 +148,7 @@ def create_vulnerabilities(count, project, options = {})
   end
 
   describe 'GET summary.json' do
-    subject { get :summary, group_id: group, format: :json }
+    subject { get :summary, params: { group_id: group }, format: :json }
 
     context 'when security dashboard feature is disabled' do
       before do
@@ -216,7 +216,7 @@ def create_vulnerabilities(count, project, options = {})
   end
 
   describe 'GET history.json' do
-    subject { get :history,  group_id: group, format: :json }
+    subject { get :history,  params: { group_id: group }, format: :json }
 
     context 'when security dashboard feature is disabled' do
       before do
diff --git a/ee/spec/controllers/groups/settings/ci_cd_controller_spec.rb b/ee/spec/controllers/groups/settings/ci_cd_controller_spec.rb
index cf085e24270289c8be08284f99e8f50ccd394ec0..dad8c1bb350c50829bf143f73a68fe2d65a39d56 100644
--- a/ee/spec/controllers/groups/settings/ci_cd_controller_spec.rb
+++ b/ee/spec/controllers/groups/settings/ci_cd_controller_spec.rb
@@ -18,7 +18,7 @@
 
     describe 'GET #show' do
       it 'renders show with 200 status code' do
-        get :show, group_id: group
+        get :show, params: { group_id: group }
 
         expect(response).to have_gitlab_http_status(200)
       end
diff --git a/ee/spec/controllers/groups/sso_controller_spec.rb b/ee/spec/controllers/groups/sso_controller_spec.rb
index 4273692b93990b5073daa96d51200d1ed469ea07..79261eaec84e0ddf6cd87ee65e37064c30e34c90 100644
--- a/ee/spec/controllers/groups/sso_controller_spec.rb
+++ b/ee/spec/controllers/groups/sso_controller_spec.rb
@@ -14,13 +14,13 @@
     let!(:saml_provider) { create(:saml_provider, group: group) }
 
     it 'has status 200' do
-      get :saml, group_id: group
+      get :saml, params: { group_id: group }
 
       expect(response).to have_gitlab_http_status(200)
     end
 
     it 'passes group name to the view' do
-      get :saml, group_id: group
+      get :saml, params: { group_id: group }
 
       expect(assigns[:group_name]).to eq 'our-group'
     end
@@ -29,7 +29,7 @@
       it 'acts as route not found' do
         sign_out(user)
 
-        get :saml, group_id: group
+        get :saml, params: { group_id: group }
 
         expect(response).to redirect_to(new_user_session_path)
       end
@@ -39,7 +39,7 @@
       let(:redirect_route) { group.redirect_routes.create(path: 'old-path') }
 
       it 'redirects to new location' do
-        get :saml, group_id: redirect_route.path
+        get :saml, params: { group_id: redirect_route.path }
 
         expect(response).to redirect_to(sso_group_saml_providers_path(group))
       end
@@ -49,7 +49,7 @@
   context 'saml_provider is unconfigured for the group' do
     context 'when user cannot configure Group SAML' do
       it 'renders 404' do
-        get :saml, group_id: group
+        get :saml, params: { group_id: group }
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -61,13 +61,13 @@
       end
 
       it 'redirects to the Group SAML config page' do
-        get :saml, group_id: group
+        get :saml, params: { group_id: group }
 
         expect(response).to redirect_to(group_saml_providers_path)
       end
 
       it 'sets a flash message explaining that setup is required' do
-        get :saml, group_id: group
+        get :saml, params: { group_id: group }
 
         expect(flash[:notice]).to match /not been configured/
       end
@@ -76,7 +76,7 @@
 
   context 'group does not exist' do
     it 'renders 404' do
-      get :saml, group_id: 'not-a-group'
+      get :saml, params: { group_id: 'not-a-group' }
 
       expect(response).to have_gitlab_http_status(404)
     end
@@ -85,7 +85,7 @@
       it 'acts as route not found' do
         sign_out(user)
 
-        get :saml, group_id: 'not-a-group'
+        get :saml, params: { group_id: 'not-a-group' }
 
         expect(response).to redirect_to(new_user_session_path)
       end
diff --git a/ee/spec/controllers/groups/todos_controller_spec.rb b/ee/spec/controllers/groups/todos_controller_spec.rb
index 5e6a34fc747a874047f01cb17b87e5ab08afbe80..10c1a6b8440b0e482a7c3852af7b08dbbd11e34c 100644
--- a/ee/spec/controllers/groups/todos_controller_spec.rb
+++ b/ee/spec/controllers/groups/todos_controller_spec.rb
@@ -9,9 +9,11 @@
   describe 'POST create' do
     def post_create
       post :create,
-        group_id: group,
-        issuable_id: epic.id,
-        issuable_type: 'epic',
+        params: {
+          group_id: group,
+          issuable_id: epic.id,
+          issuable_type: 'epic'
+        },
         format: :json
     end
 
diff --git a/ee/spec/controllers/groups/variables_controller_spec.rb b/ee/spec/controllers/groups/variables_controller_spec.rb
index dbb6b30902c1da66441697c527df9e3e9350bcb4..b3f2a7957cb9a3ce437f5d2a889bd68ecd5a5a40 100644
--- a/ee/spec/controllers/groups/variables_controller_spec.rb
+++ b/ee/spec/controllers/groups/variables_controller_spec.rb
@@ -20,7 +20,7 @@
       let!(:variable) { create(:ci_group_variable, group: group) }
 
       it 'is successful' do
-        get :show, group_id: group, format: :json
+        get :show, params: { group_id: group }, format: :json
 
         expect(response).to have_gitlab_http_status(200)
       end
@@ -32,8 +32,10 @@
 
       it 'is successful' do
         patch :update,
-              group_id: group,
-              variables_attributes: [{ id: variable.id, key: 'hello' }],
+              params: {
+                group_id: group,
+                variables_attributes: [{ id: variable.id, key: 'hello' }]
+              },
               format: :json
 
         expect(response).to have_gitlab_http_status(200)
diff --git a/ee/spec/controllers/oauth/applications_controller_spec.rb b/ee/spec/controllers/oauth/applications_controller_spec.rb
index 86c963d93251fa1e699675ada1dc86d1d4ff1a1f..b48c4e34bf8fb5dae12363c9798e9a46e9c5062e 100644
--- a/ee/spec/controllers/oauth/applications_controller_spec.rb
+++ b/ee/spec/controllers/oauth/applications_controller_spec.rb
@@ -17,7 +17,7 @@
         application = build(:oauth_application)
         application_attributes = application.attributes.merge("scopes" => [])
 
-        expect { post :create, doorkeeper_application: application_attributes }.to change { SecurityEvent.count }.by(1)
+        expect { post :create, params: { doorkeeper_application: application_attributes } }.to change { SecurityEvent.count }.by(1)
       end
     end
   end
diff --git a/ee/spec/controllers/oauth/geo_auth_controller_spec.rb b/ee/spec/controllers/oauth/geo_auth_controller_spec.rb
index 979a46b6f611538974e0e88242d1afb39b0f6081..6a262365dc05383e98136ae0c4188cb5ce9f69b2 100644
--- a/ee/spec/controllers/oauth/geo_auth_controller_spec.rb
+++ b/ee/spec/controllers/oauth/geo_auth_controller_spec.rb
@@ -22,7 +22,7 @@
     it 'redirects to root_url when state is invalid' do
       allow_any_instance_of(Gitlab::Geo::Oauth::LoginState).to receive(:valid?).and_return(false)
 
-      get :auth, state: login_state
+      get :auth, params: { state: login_state }
 
       expect(response).to redirect_to(root_url)
     end
@@ -30,7 +30,7 @@
     it "redirects to primary node's oauth endpoint" do
       oauth_endpoint = Gitlab::Geo::Oauth::Session.new.authorize_url(redirect_uri: oauth_geo_callback_url, state: login_state)
 
-      get :auth, state: login_state
+      get :auth, params: { state: login_state }
 
       expect(response).to redirect_to(oauth_endpoint)
     end
@@ -50,19 +50,19 @@
       it 'redirects to login screen if state is invalid' do
         allow_any_instance_of(Gitlab::Geo::Oauth::LoginState).to receive(:valid?).and_return(false)
 
-        get :callback, state: login_state
+        get :callback, params: { state: login_state }
 
         expect(response).to redirect_to(new_user_session_path)
       end
 
       it 'redirects to redirect_url if state is valid' do
-        get :callback, state: login_state
+        get :callback, params: { state: login_state }
 
         expect(response).to redirect_to(secondary_node.url)
       end
 
       it 'does not display a flash message if state is valid' do
-        get :callback, state: login_state
+        get :callback, params: { state: login_state }
 
         expect(controller).to set_flash[:alert].to(nil)
       end
@@ -80,7 +80,7 @@
       it 'handles invalid credentials error' do
         oauth_endpoint = Gitlab::Geo::Oauth::Session.new.authorize_url(redirect_uri: oauth_geo_callback_url, state: login_state)
 
-        get :callback, state: login_state
+        get :callback, params: { state: login_state }
 
         expect(response).to redirect_to(oauth_endpoint)
       end
@@ -95,7 +95,7 @@
       end
 
       it 'handles non-existent remote user error' do
-        get :callback, state: login_state
+        get :callback, params: { state: login_state }
 
         expect(response.code).to eq '200'
         expect(response.body).to include('Your account may have been deleted')
@@ -111,7 +111,7 @@
       end
 
       it 'handles non-existent local user error' do
-        get :callback, state: login_state
+        get :callback, params: { state: login_state }
 
         expect(response.code).to eq '200'
         expect(response.body).to include('Your account may have been deleted')
@@ -130,7 +130,7 @@
 
     context 'when access_token is valid' do
       it 'logs out and redirects to the root_url' do
-        get :logout, state: logout_state
+        get :logout, params: { state: logout_state }
 
         expect(assigns(:current_user)).to be_nil
         expect(response).to redirect_to root_url
@@ -143,7 +143,7 @@
           .to receive(:by_token)
           .and_return(double(resource_owner_id: user.id, expired?: true))
 
-        get :logout, state: logout_state
+        get :logout, params: { state: logout_state }
 
         expect(response.body).to include("There is a problem with the OAuth access_token: Token has expired")
       end
diff --git a/ee/spec/controllers/oauth/jira/authorizations_controller_spec.rb b/ee/spec/controllers/oauth/jira/authorizations_controller_spec.rb
index c05e0cb78241eb4ad92ce315ea7a0e85aa9d50bd..2524ce2a2974bcd45fdec355b62316ce41af0c8d 100644
--- a/ee/spec/controllers/oauth/jira/authorizations_controller_spec.rb
+++ b/ee/spec/controllers/oauth/jira/authorizations_controller_spec.rb
@@ -3,7 +3,7 @@
 describe Oauth::Jira::AuthorizationsController do
   describe 'GET new' do
     it 'redirects to OAuth authorization with correct params' do
-      get :new, client_id: 'client-123', redirect_uri: 'http://example.com/'
+      get :new, params: { client_id: 'client-123', redirect_uri: 'http://example.com/' }
 
       expect(response).to redirect_to(oauth_authorization_url(client_id: 'client-123',
                                                               response_type: 'code',
@@ -15,7 +15,7 @@
     it 'redirects to redirect_uri on session with code param' do
       session['redirect_uri'] = 'http://example.com'
 
-      get :callback, code: 'hash-123'
+      get :callback, params: { code: 'hash-123' }
 
       expect(response).to redirect_to('http://example.com?code=hash-123')
     end
@@ -23,7 +23,7 @@
     it 'redirects to redirect_uri on session with code param preserving existing query' do
       session['redirect_uri'] = 'http://example.com?foo=bar'
 
-      get :callback, code: 'hash-123'
+      get :callback, params: { code: 'hash-123' }
 
       expect(response).to redirect_to('http://example.com?foo=bar&code=hash-123')
     end
@@ -41,7 +41,7 @@
         { 'access_token' => 'fake-123', 'scope' => 'foo', 'token_type' => 'bar' }
       end
 
-      post :access_token, code: 'code-123', client_id: 'client-123', client_secret: 'secret-123'
+      post :access_token, params: { code: 'code-123', client_id: 'client-123', client_secret: 'secret-123' }
 
       expect(response.body).to eq('access_token=fake-123&scope=foo&token_type=bar')
     end
diff --git a/ee/spec/controllers/operations_controller_spec.rb b/ee/spec/controllers/operations_controller_spec.rb
index 80455297503eb7aae62829dacb17333116fe35e7..696ba1881718d75b6fabf4c1ad05f96d0c4be66a 100644
--- a/ee/spec/controllers/operations_controller_spec.rb
+++ b/ee/spec/controllers/operations_controller_spec.rb
@@ -155,7 +155,7 @@
       end
 
       it 'adds projects to the dasboard' do
-        post :create, project_ids: [project_a.id, project_b.id.to_s]
+        post :create, params: { project_ids: [project_a.id, project_b.id.to_s] }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response).to match_schema('dashboard/operations/add', dir: 'ee')
@@ -168,7 +168,7 @@
       end
 
       it 'cannot add a project twice' do
-        post :create, project_ids: [project_a.id, project_a.id]
+        post :create, params: { project_ids: [project_a.id, project_a.id] }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response).to match_schema('dashboard/operations/add', dir: 'ee')
@@ -181,7 +181,7 @@
       end
 
       it 'does not add invalid project ids' do
-        post :create, project_ids: ['', -1, '-2']
+        post :create, params: { project_ids: ['', -1, '-2'] }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response).to match_schema('dashboard/operations/add', dir: 'ee')
@@ -203,7 +203,7 @@
       end
 
       it 'does not add already added project' do
-        post :create, project_ids: [project.id]
+        post :create, params: { project_ids: [project.id] }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response).to match_schema('dashboard/operations/add', dir: 'ee')
@@ -240,7 +240,7 @@
       end
 
       it 'removes a project successfully' do
-        delete :destroy, project_id: project.id
+        delete :destroy, params: { project_id: project.id }
 
         expect(response).to have_gitlab_http_status(200)
 
@@ -251,7 +251,7 @@
 
     context 'without projects' do
       it 'cannot remove invalid project' do
-        delete :destroy, project_id: -1
+        delete :destroy, params: { project_id: -1 }
 
         expect(response).to have_gitlab_http_status(204)
       end
diff --git a/ee/spec/controllers/profiles/keys_controller_spec.rb b/ee/spec/controllers/profiles/keys_controller_spec.rb
index 7300bc65c207620a2a8300834206006072be2db7..37deda4fe8581c93cab5151ce5bbb02bac4fbc61 100644
--- a/ee/spec/controllers/profiles/keys_controller_spec.rb
+++ b/ee/spec/controllers/profiles/keys_controller_spec.rb
@@ -11,7 +11,7 @@
 
       key = build(:key)
 
-      expect { post :create, key: key.attributes }.to change { SecurityEvent.count }.by(1)
+      expect { post :create, params: { key: key.attributes } }.to change { SecurityEvent.count }.by(1)
     end
   end
 end
diff --git a/ee/spec/controllers/projects/approver_groups_controller_spec.rb b/ee/spec/controllers/projects/approver_groups_controller_spec.rb
index 2ad81d24071c08600f3dd7f6b6833bce76d0f03e..bb5e8a7a9f41b44e00d42c4dc1ddd976e13d859d 100644
--- a/ee/spec/controllers/projects/approver_groups_controller_spec.rb
+++ b/ee/spec/controllers/projects/approver_groups_controller_spec.rb
@@ -19,10 +19,12 @@
 
       def destroy_merge_request_approver_group
         delete :destroy,
-               namespace_id: project.namespace.to_param,
-               project_id: project.to_param,
-               merge_request_id: merge_request.to_param,
-               id: approver_group.id
+               params: {
+                 namespace_id: project.namespace.to_param,
+                 project_id: project.to_param,
+                 merge_request_id: merge_request.to_param,
+                 id: approver_group.id
+               }
       end
 
       context 'when the user cannot update approvers because they do not have access' do
@@ -73,9 +75,11 @@ def destroy_merge_request_approver_group
 
       def destroy_project_approver_group
         delete :destroy,
-               namespace_id: project.namespace.to_param,
-               project_id: project.to_param,
-               id: approver_group.id
+               params: {
+                 namespace_id: project.namespace.to_param,
+                 project_id: project.to_param,
+                 id: approver_group.id
+               }
       end
 
       context 'when the user cannot update approvers because they do not have access' do
diff --git a/ee/spec/controllers/projects/approvers_controller_spec.rb b/ee/spec/controllers/projects/approvers_controller_spec.rb
index 5645cd453606cef09e1703166849987c9fe34f40..c87b242b08261b5668d9ea8dc3de2e6d2ab1b3b6 100644
--- a/ee/spec/controllers/projects/approvers_controller_spec.rb
+++ b/ee/spec/controllers/projects/approvers_controller_spec.rb
@@ -19,10 +19,12 @@
 
       def destroy_merge_request_approver
         delete :destroy,
-               namespace_id: project.namespace.to_param,
-               project_id: project.to_param,
-               merge_request_id: merge_request.to_param,
-               id: approver.id
+               params: {
+                 namespace_id: project.namespace.to_param,
+                 project_id: project.to_param,
+                 merge_request_id: merge_request.to_param,
+                 id: approver.id
+               }
       end
 
       context 'when the user cannot update approvers because they do not have access' do
@@ -73,9 +75,11 @@ def destroy_merge_request_approver
 
       def destroy_project_approver
         delete :destroy,
-               namespace_id: project.namespace.to_param,
-               project_id: project.to_param,
-               id: approver.id
+               params: {
+                 namespace_id: project.namespace.to_param,
+                 project_id: project.to_param,
+                 id: approver.id
+               }
       end
 
       context 'when the user cannot update approvers because they do not have access' do
diff --git a/ee/spec/controllers/projects/boards_controller_spec.rb b/ee/spec/controllers/projects/boards_controller_spec.rb
index cbe2e353471d785f4cce735be61b5994caab86a4..ad509147b1bbaad8288a473a6cee41f183ac787c 100644
--- a/ee/spec/controllers/projects/boards_controller_spec.rb
+++ b/ee/spec/controllers/projects/boards_controller_spec.rb
@@ -30,8 +30,10 @@
     end
 
     def list_boards(format: :html)
-      get :index, namespace_id: project.namespace,
-                  project_id: project,
+      get :index, params: {
+                    namespace_id: project.namespace,
+                    project_id: project
+                  },
                   format: format
     end
   end
@@ -116,9 +118,11 @@ def list_boards(format: :html)
     end
 
     def create_board(board_params)
-      post :create, namespace_id: project.namespace.to_param,
-                    project_id: project.to_param,
-                    board: board_params,
+      post :create, params: {
+                      namespace_id: project.namespace.to_param,
+                      project_id: project.to_param,
+                      board: board_params
+                    },
                     format: :json
     end
   end
@@ -189,10 +193,12 @@ def create_board(board_params)
     end
 
     def update_board(board, update_params)
-      patch :update, namespace_id: project.namespace.to_param,
-                     project_id: project.to_param,
-                     id: board.to_param,
-                     board: update_params,
+      patch :update, params: {
+                       namespace_id: project.namespace.to_param,
+                       project_id: project.to_param,
+                       id: board.to_param,
+                       board: update_params
+                     },
                      format: :json
     end
   end
@@ -235,9 +241,11 @@ def update_board(board, update_params)
     end
 
     def remove_board(board:)
-      delete :destroy, namespace_id: project.namespace.to_param,
-                       project_id: project.to_param,
-                       id: board.to_param,
+      delete :destroy, params: {
+                         namespace_id: project.namespace.to_param,
+                         project_id: project.to_param,
+                         id: board.to_param
+                       },
                        format: :html
     end
   end
diff --git a/ee/spec/controllers/projects/clusters_controller_spec.rb b/ee/spec/controllers/projects/clusters_controller_spec.rb
index 14c0bfa8c52d749a54a3afa78fb01f921adf3954..4fb98544243d48f26133a96aad207dcd8a1daf49 100644
--- a/ee/spec/controllers/projects/clusters_controller_spec.rb
+++ b/ee/spec/controllers/projects/clusters_controller_spec.rb
@@ -69,10 +69,12 @@
     end
 
     def go
-      get :metrics, format: :json,
-                    namespace_id: project.namespace,
-                    project_id: project,
-                    id: cluster
+      get :metrics, params: {
+                      namespace_id: project.namespace,
+                      project_id: project,
+                      id: cluster
+                    },
+                    format: :json
     end
 
     describe 'security' do
diff --git a/ee/spec/controllers/projects/environments_controller_spec.rb b/ee/spec/controllers/projects/environments_controller_spec.rb
index faef4a13956d8c0b193301ee28e50d3923f1c890..f1bffe1b0b8009a6ae364912f501e9a97f0f01a8 100644
--- a/ee/spec/controllers/projects/environments_controller_spec.rb
+++ b/ee/spec/controllers/projects/environments_controller_spec.rb
@@ -41,7 +41,7 @@
         before do
           stub_licensed_features(deploy_board: true)
 
-          get :index, environment_params(format: :json, scope: :available)
+          get :index, params: environment_params(format: :json, scope: :available)
         end
 
         it 'responds with matching schema' do
@@ -63,7 +63,7 @@
         before do
           stub_licensed_features(deploy_board: false)
 
-          get :index, environment_params(format: :json)
+          get :index, params: environment_params(format: :json)
         end
 
         it 'does not return the rollout_status_path attribute' do
@@ -94,7 +94,7 @@
       end
 
       it 'renders forbidden' do
-        get :logs, environment_params(pod_name: pod_name)
+        get :logs, params: environment_params(pod_name: pod_name)
 
         expect(response).to have_gitlab_http_status(:not_found)
       end
@@ -102,7 +102,7 @@
 
     context 'when using HTML format' do
       it 'renders logs template' do
-        get :logs, environment_params(pod_name: pod_name)
+        get :logs, params: environment_params(pod_name: pod_name)
 
         expect(response).to be_ok
         expect(response).to render_template 'logs'
@@ -111,7 +111,7 @@
 
     context 'when using JSON format' do
       it 'returns the logs for a specific pod' do
-        get :logs, environment_params(pod_name: pod_name, format: :json)
+        get :logs, params: environment_params(pod_name: pod_name, format: :json)
 
         expect(response).to be_ok
         expect(json_response["logs"]).to match_array(["Log 1", "Log 2", "Log 3"])
@@ -133,7 +133,7 @@
         before do
           protected_environment
 
-          get :terminal, environment_params
+          get :terminal, params: environment_params
         end
 
         it 'should response with access denied' do
@@ -145,7 +145,7 @@
         before do
           protected_environment.deploy_access_levels.create(user: user)
 
-          get :terminal, environment_params
+          get :terminal, params: environment_params
         end
 
         it 'should be successful' do
@@ -156,7 +156,7 @@
 
     context 'when environment is not protected' do
       it 'should be successful' do
-        get :terminal, environment_params
+        get :terminal, params: environment_params
 
         expect(response).to have_gitlab_http_status(200)
       end
diff --git a/ee/spec/controllers/projects/feature_flags_controller_spec.rb b/ee/spec/controllers/projects/feature_flags_controller_spec.rb
index 8944f83594cd7a1d9fc6221fc44a72d53df84f35..1d222926e89233ed2749ff6215d139f7d97e4cc5 100644
--- a/ee/spec/controllers/projects/feature_flags_controller_spec.rb
+++ b/ee/spec/controllers/projects/feature_flags_controller_spec.rb
@@ -17,7 +17,7 @@
   describe 'GET index' do
     render_views
 
-    subject { get(:index, view_params) }
+    subject { get(:index, params: view_params) }
 
     context 'when there is no feature flags' do
       before do
@@ -63,7 +63,7 @@
   describe 'GET new' do
     render_views
 
-    subject { get(:new, view_params) }
+    subject { get(:new, params: view_params) }
 
     it 'renders the form' do
       subject
@@ -77,7 +77,7 @@
   describe 'POST create' do
     render_views
 
-    subject { post(:create, params) }
+    subject { post(:create, params: params) }
 
     context 'when creating a new feature flag' do
       let(:params) do
@@ -112,7 +112,7 @@
 
     render_views
 
-    subject { post(:create, params) }
+    subject { post(:create, params: params) }
 
     context 'when updating an existing feature flag' do
       let(:params) do
diff --git a/ee/spec/controllers/projects/imports_controller_spec.rb b/ee/spec/controllers/projects/imports_controller_spec.rb
index 78890a4e23b57a59856d51c980dc51fc1c1c4e43..077087f1be26aab2a727f491a72e6780ea56278c 100644
--- a/ee/spec/controllers/projects/imports_controller_spec.rb
+++ b/ee/spec/controllers/projects/imports_controller_spec.rb
@@ -17,9 +17,11 @@
         new_user = create(:user)
         project.add_maintainer(new_user)
 
-        post :create, namespace_id: project.namespace.to_param,
-                      project_id: project,
-                      project: { mirror: true, mirror_user_id: new_user.id, import_url: 'http://local.dev' },
+        post :create, params: {
+                        namespace_id: project.namespace.to_param,
+                        project_id: project,
+                        project: { mirror: true, mirror_user_id: new_user.id, import_url: 'http://local.dev' }
+                      },
                       format: :json
 
         expect(project.reload.mirror).to eq(true)
diff --git a/ee/spec/controllers/projects/issues_controller_spec.rb b/ee/spec/controllers/projects/issues_controller_spec.rb
index 72afdd6c6bed3600bd84d8756e195440eefa0a3c..c6d535d9eba4b35c253e86aeb9f87902e12cc444 100644
--- a/ee/spec/controllers/projects/issues_controller_spec.rb
+++ b/ee/spec/controllers/projects/issues_controller_spec.rb
@@ -14,7 +14,7 @@
     end
 
     it_behaves_like 'unauthorized when external service denies access' do
-      subject { get :index, namespace_id: project.namespace, project_id: project }
+      subject { get :index, params: { namespace_id: project.namespace, project_id: project } }
     end
   end
 
@@ -33,7 +33,7 @@
     end
 
     def request_csv
-      post :export_csv, namespace_id: project.namespace.to_param, project_id: project.to_param
+      post :export_csv, params: { namespace_id: project.namespace.to_param, project_id: project.to_param }
     end
 
     context 'unlicensed' do
@@ -198,7 +198,7 @@ def perform(method, action, opts = {})
 
   describe 'GET service_desk' do
     def get_service_desk(extra_params = {})
-      get :service_desk, extra_params.merge(namespace_id: project.namespace, project_id: project)
+      get :service_desk, params: extra_params.merge(namespace_id: project.namespace, project_id: project)
     end
 
     context 'when Service Desk is available on the project' do
@@ -265,7 +265,7 @@ def get_service_desk(extra_params = {})
           end
 
           it 'displays related notes' do
-            get :discussions, namespace_id: project.namespace, project_id: project, id: issue.iid
+            get :discussions, params: { namespace_id: project.namespace, project_id: project, id: issue.iid }
 
             discussions = json_response
             notes = discussions.flat_map {|d| d['notes']}
@@ -283,7 +283,7 @@ def get_service_desk(extra_params = {})
           end
 
           it 'redacts note related to a confidential issue' do
-            get :discussions, namespace_id: project.namespace, project_id: project, id: issue.iid
+            get :discussions, params: { namespace_id: project.namespace, project_id: project, id: issue.iid }
 
             discussions = json_response
             notes = discussions.flat_map {|d| d['notes']}
diff --git a/ee/spec/controllers/projects/jobs_controller_spec.rb b/ee/spec/controllers/projects/jobs_controller_spec.rb
index a201704e7408a4ec49653a1a7258ad2ff83d398f..e741236b2760eea2cdd813aff24f94591d7e37a2 100644
--- a/ee/spec/controllers/projects/jobs_controller_spec.rb
+++ b/ee/spec/controllers/projects/jobs_controller_spec.rb
@@ -122,7 +122,7 @@ def get_show(**extra_params)
           project_id: project
       }
 
-      get :show, params.merge(extra_params)
+      get :show, params: params.merge(extra_params)
     end
   end
 end
diff --git a/ee/spec/controllers/projects/managed_licenses_controller_spec.rb b/ee/spec/controllers/projects/managed_licenses_controller_spec.rb
index afd9b5c1d7430966f45a1c2d21a374c7f9870ba1..b0963d0fab948ed49063cc2145be9fb13128011d 100644
--- a/ee/spec/controllers/projects/managed_licenses_controller_spec.rb
+++ b/ee/spec/controllers/projects/managed_licenses_controller_spec.rb
@@ -43,7 +43,7 @@
     subject do
       allow(controller).to receive(:current_user).and_return(user)
 
-      get :index, namespace_id: project.namespace.to_param, project_id: project, format: :json
+      get :index, params: { namespace_id: project.namespace.to_param, project_id: project }, format: :json
     end
 
     context 'with license management not available' do
@@ -101,9 +101,11 @@
       allow(controller).to receive(:current_user).and_return(user)
 
       get :show,
-        namespace_id: project.namespace.to_param,
-        project_id: project,
-        id: software_license_policy.id,
+        params: {
+          namespace_id: project.namespace.to_param,
+          project_id: project,
+          id: software_license_policy.id
+        },
         format: :json
     end
 
@@ -152,9 +154,11 @@
       allow(controller).to receive(:current_user).and_return(user)
 
       get :show,
-          namespace_id: project.namespace.to_param,
-          project_id: project,
-          id: CGI.escape(software_license_policy.name),
+          params: {
+            namespace_id: project.namespace.to_param,
+            project_id: project,
+            id: CGI.escape(software_license_policy.name)
+          },
           format: :json
     end
 
@@ -188,9 +192,11 @@
       allow(controller).to receive(:current_user).and_return(user)
 
       post :create,
-        namespace_id: project.namespace.to_param,
-        project_id: project,
-        managed_license: to_create_software_license_policy_attributes,
+        params: {
+          namespace_id: project.namespace.to_param,
+          project_id: project,
+          managed_license: to_create_software_license_policy_attributes
+        },
         format: :json
     end
 
@@ -297,10 +303,12 @@
       allow(controller).to receive(:current_user).and_return(user)
 
       patch :update,
-        namespace_id: project.namespace.to_param,
-        project_id: project,
-        id: software_license_policy.id,
-        managed_license: modified_software_license_policy_attributes,
+        params: {
+          namespace_id: project.namespace.to_param,
+          project_id: project,
+          id: software_license_policy.id,
+          managed_license: modified_software_license_policy_attributes
+        },
         format: :json
     end
 
@@ -401,9 +409,11 @@
       allow(controller).to receive(:current_user).and_return(user)
 
       delete :destroy,
-        namespace_id: project.namespace.to_param,
-        project_id: project,
-        id: id_to_destroy,
+        params: {
+          namespace_id: project.namespace.to_param,
+          project_id: project,
+          id: id_to_destroy
+        },
         format: :json
     end
 
diff --git a/ee/spec/controllers/projects/merge_requests/creations_controller_spec.rb b/ee/spec/controllers/projects/merge_requests/creations_controller_spec.rb
index 06990b03755a1a125a9aee3dec6c77cb5f74796c..f0342033837486bc36087a6a82d4ff2ba3afe78d 100644
--- a/ee/spec/controllers/projects/merge_requests/creations_controller_spec.rb
+++ b/ee/spec/controllers/projects/merge_requests/creations_controller_spec.rb
@@ -23,7 +23,7 @@ def create_merge_request(overrides = {})
         }.merge(overrides)
       }
 
-      post :create, params
+      post :create, params: params
     end
 
     context 'the approvals_before_merge param' do
diff --git a/ee/spec/controllers/projects/merge_requests/drafts_controller_spec.rb b/ee/spec/controllers/projects/merge_requests/drafts_controller_spec.rb
index d3b9a041515d4da9cffa8fc5bfed8c2418e08da6..bdda9320156993de6f65938275574bfa502d40eb 100644
--- a/ee/spec/controllers/projects/merge_requests/drafts_controller_spec.rb
+++ b/ee/spec/controllers/projects/merge_requests/drafts_controller_spec.rb
@@ -24,7 +24,7 @@
     let!(:draft_note) { create(:draft_note, merge_request: merge_request, author: user) }
 
     it 'list merge request draft notes for current user' do
-      get :index, params
+      get :index, params: params
 
       expect(json_response.first['merge_request_id']).to eq(merge_request.id)
       expect(json_response.first['author']['id']).to eq(user.id)
@@ -40,7 +40,7 @@ def create_draft_note(draft_overrides: {}, overrides: {})
         }.merge(draft_overrides)
       }.merge(overrides))
 
-      post :create, post_params
+      post :create, params: post_params
     end
 
     context 'without permissions' do
@@ -147,7 +147,7 @@ def update_draft_note(overrides = {})
         }.merge(overrides)
       })
 
-      put :update, put_params
+      put :update, params: put_params
     end
 
     context 'without permissions' do
@@ -186,7 +186,7 @@ def update_draft_note(overrides = {})
       it 'does not allow publishing draft note belonging to someone else' do
         draft = create(:draft_note, merge_request: merge_request, author: user)
 
-        expect { post :publish, params.merge(id: draft.id) }.to change { Note.count }.by(0)
+        expect { post :publish, params: params.merge(id: draft.id) }.to change { Note.count }.by(0)
           .and change { DraftNote.count }.by(0)
 
         expect(response).to have_gitlab_http_status(404)
@@ -202,7 +202,7 @@ def update_draft_note(overrides = {})
           allow(service).to receive(:execute).and_return({ message: error_message, status: :error })
         end
 
-        post :publish, params
+        post :publish, params: params
 
         expect(response).to have_gitlab_http_status(:error)
         expect(json_response["message"]).to include(error_message)
@@ -222,7 +222,7 @@ def update_draft_note(overrides = {})
 
       draft = create(:draft_note_on_text_diff, merge_request: merge_request, author: user, position: position)
 
-      expect { post :publish, params }.to change { Note.count }.by(1)
+      expect { post :publish, params: params }.to change { Note.count }.by(1)
         .and change { DraftNote.count }.by(-1)
 
       note = merge_request.notes.reload.last
@@ -232,7 +232,7 @@ def update_draft_note(overrides = {})
     end
 
     it 'does nothing if there are no draft notes' do
-      expect { post :publish, params }.to change { Note.count }.by(0).and change { DraftNote.count }.by(0)
+      expect { post :publish, params: params }.to change { Note.count }.by(0).and change { DraftNote.count }.by(0)
     end
 
     it 'publishes a draft note with quick actions and applies them' do
@@ -240,7 +240,7 @@ def update_draft_note(overrides = {})
 
       expect(merge_request.assignee_id).to be_nil
 
-      expect { post :publish, params }.to change { Note.count }.by(1)
+      expect { post :publish, params: params }.to change { Note.count }.by(1)
         .and change { DraftNote.count }.by(-1)
 
       expect(response).to have_gitlab_http_status(200)
@@ -259,7 +259,7 @@ def update_draft_note(overrides = {})
       diff_note = create(:diff_note_on_merge_request, noteable: merge_request, project: project)
       diff_draft_reply = create(:draft_note, draft_params.merge(discussion_id: diff_note.discussion_id))
 
-      expect { post :publish, params }.to change { Note.count }.by(6)
+      expect { post :publish, params: params }.to change { Note.count }.by(6)
         .and change { DraftNote.count }.by(-6)
 
       expect(response).to have_gitlab_http_status(200)
@@ -276,7 +276,7 @@ def update_draft_note(overrides = {})
 
       drafts = create_list(:draft_note, 4, draft_params)
 
-      expect { post :publish, params.merge(id: drafts.first.id) }.to change { Note.count }.by(1)
+      expect { post :publish, params: params.merge(id: drafts.first.id) }.to change { Note.count }.by(1)
         .and change { DraftNote.count }.by(-1)
     end
 
@@ -295,7 +295,7 @@ def create_reply(discussion_id, resolves: false)
       it 'resolves a discussion if the draft note resolves it' do
         draft_reply = create_reply(note.discussion_id, resolves: true)
 
-        post :publish, params
+        post :publish, params: params
 
         discussion = note.discussion
 
@@ -310,7 +310,7 @@ def create_reply(discussion_id, resolves: false)
 
         draft_reply = create_reply(note.discussion_id, resolves: false)
 
-        post :publish, params
+        post :publish, params: params
 
         discussion = note.discussion
 
@@ -336,7 +336,7 @@ def create_draft
       it 'does not allow destroying a draft note belonging to someone else' do
         draft = create(:draft_note, merge_request: merge_request, author: user)
 
-        expect { post :destroy, params.merge(id: draft.id) }
+        expect { post :destroy, params: params.merge(id: draft.id) }
           .not_to change { DraftNote.count }
 
         expect(response).to have_gitlab_http_status(404)
@@ -346,7 +346,7 @@ def create_draft
     it 'destroys the draft note when ID is given' do
       draft = create_draft
 
-      expect { delete :destroy, params.merge(id: draft.id) }.to change { DraftNote.count }.by(-1)
+      expect { delete :destroy, params: params.merge(id: draft.id) }.to change { DraftNote.count }.by(-1)
       expect(response).to have_gitlab_http_status(200)
     end
 
@@ -358,7 +358,7 @@ def create_draft
       it 'does not allow editing draft note belonging to someone else' do
         draft = create_draft
 
-        expect { delete :destroy, params.merge(id: draft.id) }.to change { DraftNote.count }.by(0)
+        expect { delete :destroy, params: params.merge(id: draft.id) }.to change { DraftNote.count }.by(0)
         expect(response).to have_gitlab_http_status(404)
       end
     end
@@ -368,7 +368,7 @@ def create_draft
     it 'deletes all DraftNotes belonging to a user in a Merge Request' do
       create_list(:draft_note, 6, merge_request: merge_request, author: user)
 
-      expect { delete :discard, params }.to change { DraftNote.count }.by(-6)
+      expect { delete :discard, params: params }.to change { DraftNote.count }.by(-6)
       expect(response).to have_gitlab_http_status(200)
     end
 
@@ -381,7 +381,7 @@ def create_draft
       it 'does not destroys a draft note belonging to someone else' do
         create(:draft_note, merge_request: merge_request, author: user)
 
-        expect { post :discard, params }
+        expect { post :discard, params: params }
           .not_to change { DraftNote.count }
 
         expect(response).to have_gitlab_http_status(200)
@@ -394,7 +394,7 @@ def create_draft
       it 'does not return existing drafts' do
         create_list(:draft_note, 4, merge_request: merge_request, author: user)
 
-        get :index, params
+        get :index, params: params
 
         expect(json_response).to eq([])
       end
@@ -403,7 +403,7 @@ def create_draft
     context 'POST #create' do
       it 'errors out' do
         expect do
-          post :create, params.merge(draft_note: { note: 'comment' })
+          post :create, params: params.merge(draft_note: { note: 'comment' })
         end.to change { DraftNote.count }.by(0)
 
         expect(response).to have_gitlab_http_status(403)
@@ -415,7 +415,7 @@ def create_draft
         draft = create(:draft_note, merge_request: merge_request, author: user)
 
         expect do
-          put :update, params.merge(id: draft.id, draft_note: { note: 'comment' })
+          put :update, params: params.merge(id: draft.id, draft_note: { note: 'comment' })
         end.to change { DraftNote.count }.by(0)
 
         expect(response).to have_gitlab_http_status(403)
@@ -426,7 +426,7 @@ def create_draft
       it 'errors out' do
         draft = create(:draft_note, merge_request: merge_request, author: user)
 
-        expect { delete :destroy, params.merge(id: draft.id) }.to change { DraftNote.count }.by(0)
+        expect { delete :destroy, params: params.merge(id: draft.id) }.to change { DraftNote.count }.by(0)
         expect(response).to have_gitlab_http_status(403)
       end
     end
@@ -439,7 +439,7 @@ def create_draft
       context 'POST #publish' do
         it 'errors out' do
           expect do
-            post :publish, params
+            post :publish, params: params
           end.to change { DraftNote.count }.by(0).and change { Note.count }.by(0)
 
           expect(response).to have_gitlab_http_status(403)
@@ -450,7 +450,7 @@ def create_draft
       context 'DELETE #discard' do
         it 'errors out' do
           expect do
-            delete :discard, params
+            delete :discard, params: params
           end.to change { DraftNote.count }.by(0)
 
           expect(response).to have_gitlab_http_status(403)
diff --git a/ee/spec/controllers/projects/merge_requests_controller_spec.rb b/ee/spec/controllers/projects/merge_requests_controller_spec.rb
index bdeef07a916f7e9e3485f299dda9b99e3e48d229..63208d9f30497217c3038b83ff77cbabea807f71 100644
--- a/ee/spec/controllers/projects/merge_requests_controller_spec.rb
+++ b/ee/spec/controllers/projects/merge_requests_controller_spec.rb
@@ -16,9 +16,11 @@ def json_response
   describe 'approve' do
     before do
       post :approve,
-           namespace_id: project.namespace.to_param,
-           project_id: project.to_param,
-           id: merge_request.iid,
+           params: {
+             namespace_id: project.namespace.to_param,
+             project_id: project.to_param,
+             id: merge_request.iid
+           },
            format: :json
     end
 
@@ -41,9 +43,11 @@ def json_response
 
     before do
       get :approvals,
-          namespace_id: project.namespace.to_param,
-          project_id: project.to_param,
-          id: merge_request.iid,
+          params: {
+            namespace_id: project.namespace.to_param,
+            project_id: project.to_param,
+            id: merge_request.iid
+          },
           format: :json
     end
 
@@ -66,9 +70,11 @@ def json_response
 
     before do
       delete :unapprove,
-             namespace_id: project.namespace.to_param,
-             project_id: project.to_param,
-             id: merge_request.iid,
+             params: {
+               namespace_id: project.namespace.to_param,
+               project_id: project.to_param,
+               id: merge_request.iid
+             },
              format: :json
     end
 
@@ -106,10 +112,12 @@ def json_response
 
     def update_merge_request(params = {})
       post :update,
-           namespace_id: merge_request.target_project.namespace.to_param,
-           project_id: merge_request.target_project.to_param,
-           id: merge_request.iid,
-           merge_request: params
+           params: {
+             namespace_id: merge_request.target_project.namespace.to_param,
+             project_id: merge_request.target_project.to_param,
+             id: merge_request.iid,
+             merge_request: params
+           }
     end
 
     context 'when the merge request requires approval' do
@@ -319,7 +327,7 @@ def update_merge_request(params = {})
 
   describe 'POST #rebase' do
     def post_rebase
-      post :rebase, namespace_id: project.namespace, project_id: project, id: merge_request
+      post :rebase, params: { namespace_id: project.namespace, project_id: project, id: merge_request }
     end
 
     def expect_rebase_worker_for(user)
diff --git a/ee/spec/controllers/projects/mirrors_controller_spec.rb b/ee/spec/controllers/projects/mirrors_controller_spec.rb
index 3c6ed893cc9babd92b7997b32c41abdcd10396db..272beab9b695bfe3dbc5f0c5066db7922337e55c 100644
--- a/ee/spec/controllers/projects/mirrors_controller_spec.rb
+++ b/ee/spec/controllers/projects/mirrors_controller_spec.rb
@@ -122,7 +122,7 @@
 
       expect_any_instance_of(EE::ProjectImportState).to receive(:force_import_job!)
 
-      put :update_now, { namespace_id: project.namespace.to_param, project_id: project.to_param }
+      put :update_now, params: { namespace_id: project.namespace.to_param, project_id: project.to_param }
     end
   end
 
@@ -218,6 +218,6 @@ def do_put(project, options, extra_attrs = {})
     attrs = extra_attrs.merge(namespace_id: project.namespace.to_param, project_id: project.to_param)
     attrs[:project] = options
 
-    put :update, attrs
+    put :update, params: attrs
   end
 end
diff --git a/ee/spec/controllers/projects/pipelines_controller_spec.rb b/ee/spec/controllers/projects/pipelines_controller_spec.rb
index be1f2ac0806a9794642a35210c2c0f02ac7baf97..ce8dd1e93589f18b9dd93aeb77fefedd6b588974 100644
--- a/ee/spec/controllers/projects/pipelines_controller_spec.rb
+++ b/ee/spec/controllers/projects/pipelines_controller_spec.rb
@@ -22,7 +22,7 @@
         before do
           stub_licensed_features(sast: true)
 
-          get :security, namespace_id: project.namespace, project_id: project, id: pipeline
+          get :security, params: { namespace_id: project.namespace, project_id: project, id: pipeline }
         end
 
         it do
@@ -33,7 +33,7 @@
 
       context 'with feature disabled' do
         before do
-          get :security, namespace_id: project.namespace, project_id: project, id: pipeline
+          get :security, params: { namespace_id: project.namespace, project_id: project, id: pipeline }
         end
 
         it do
@@ -47,7 +47,7 @@
         before do
           stub_licensed_features(sast: true)
 
-          get :security, namespace_id: project.namespace, project_id: project, id: pipeline
+          get :security, params: { namespace_id: project.namespace, project_id: project, id: pipeline }
         end
 
         it do
@@ -57,7 +57,7 @@
 
       context 'with feature disabled' do
         before do
-          get :security, namespace_id: project.namespace, project_id: project, id: pipeline
+          get :security, params: { namespace_id: project.namespace, project_id: project, id: pipeline }
         end
 
         it do
@@ -80,7 +80,7 @@
         before do
           stub_licensed_features(license_management: true)
 
-          get :licenses, namespace_id: project.namespace, project_id: project, id: pipeline
+          get :licenses, params: { namespace_id: project.namespace, project_id: project, id: pipeline }
         end
 
         it do
@@ -91,7 +91,7 @@
 
       context 'with feature disabled' do
         before do
-          get :licenses, namespace_id: project.namespace, project_id: project, id: pipeline
+          get :licenses, params: { namespace_id: project.namespace, project_id: project, id: pipeline }
         end
 
         it do
@@ -105,7 +105,7 @@
         before do
           stub_licensed_features(license_management: true)
 
-          get :licenses, namespace_id: project.namespace, project_id: project, id: pipeline
+          get :licenses, params: { namespace_id: project.namespace, project_id: project, id: pipeline }
         end
 
         it do
@@ -115,7 +115,7 @@
 
       context 'with feature disabled' do
         before do
-          get :licenses, namespace_id: project.namespace, project_id: project, id: pipeline
+          get :licenses, params: { namespace_id: project.namespace, project_id: project, id: pipeline }
         end
 
         it do
diff --git a/ee/spec/controllers/projects/prometheus/alerts_controller_spec.rb b/ee/spec/controllers/projects/prometheus/alerts_controller_spec.rb
index a7c2b4a72ceaa7ecd1de6f4b7273c727aa094b39..354ca0782bb1d43b8cd73cbe2b67b1ddf6177e2f 100644
--- a/ee/spec/controllers/projects/prometheus/alerts_controller_spec.rb
+++ b/ee/spec/controllers/projects/prometheus/alerts_controller_spec.rb
@@ -19,13 +19,13 @@
       it 'renders forbidden when unlicensed' do
         stub_licensed_features(prometheus_alerts: false)
 
-        get :index, project_params
+        get :index, params: project_params
 
         expect(response).to have_gitlab_http_status(:not_found)
       end
 
       it 'returns an empty response' do
-        get :index, project_params
+        get :index, params: project_params
 
         expect(response).to have_gitlab_http_status(200)
         expect(JSON.parse(response.body)).to be_empty
@@ -38,7 +38,7 @@
       end
 
       it 'contains prometheus alerts' do
-        get :index, project_params
+        get :index, params: project_params
 
         expect(response).to have_gitlab_http_status(200)
         expect(JSON.parse(response.body).count).to eq(3)
@@ -49,7 +49,7 @@
   describe 'GET #show' do
     context 'when alert does not exist' do
       it 'renders 404' do
-        get :show, project_params(id: PrometheusAlert.all.maximum(:prometheus_metric_id).to_i + 1)
+        get :show, params: project_params(id: PrometheusAlert.all.maximum(:prometheus_metric_id).to_i + 1)
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -61,7 +61,7 @@
       it 'renders forbidden when unlicensed' do
         stub_licensed_features(prometheus_alerts: false)
 
-        get :show, project_params(id: alert.prometheus_metric_id)
+        get :show, params: project_params(id: alert.prometheus_metric_id)
 
         expect(response).to have_gitlab_http_status(:not_found)
       end
@@ -76,7 +76,7 @@
           "alert_path" => Gitlab::Routing.url_helpers.project_prometheus_alert_path(project, alert.prometheus_metric_id, environment_id: alert.environment.id, format: :json)
         }
 
-        get :show, project_params(id: alert.prometheus_metric_id)
+        get :show, params: project_params(id: alert.prometheus_metric_id)
 
         expect(response).to have_gitlab_http_status(200)
         expect(JSON.parse(response.body)).to include(alert_params)
@@ -95,7 +95,7 @@
     it 'sends a notification for firing alerts only' do
       expect(notify_service).to receive(:execute).and_return(true)
 
-      post :notify, project_params(payload), as: :json
+      post :notify, params: project_params(payload), session: { as: :json }
 
       expect(response).to have_gitlab_http_status(200)
     end
@@ -103,7 +103,7 @@
     it 'renders unprocessable entity if notification fails' do
       expect(notify_service).to receive(:execute).and_return(false)
 
-      post :notify, project_params, as: :json
+      post :notify, params: project_params, session: { as: :json }
 
       expect(response).to have_gitlab_http_status(422)
     end
@@ -113,7 +113,7 @@
     it 'renders forbidden when unlicensed' do
       stub_licensed_features(prometheus_alerts: false)
 
-      post :create, project_params(
+      post :create, params: project_params(
         operator: ">",
         threshold: "1",
         environment_id: environment.id,
@@ -134,7 +134,7 @@
 
       allow(::Clusters::Applications::ScheduleUpdateService).to receive(:new).and_return(schedule_update_service)
 
-      post :create, project_params(
+      post :create, params: project_params(
         operator: ">",
         threshold: "1",
         environment_id: environment.id,
@@ -150,7 +150,7 @@
       let(:environment) { create(:environment) }
 
       it 'returns 204 status' do
-        post :create, project_params(
+        post :create, params: project_params(
           operator: ">",
           threshold: "1",
           environment_id: environment.id,
@@ -173,7 +173,7 @@
     it 'renders forbidden when unlicensed' do
       stub_licensed_features(prometheus_alerts: false)
 
-      put :update, project_params(id: alert.prometheus_metric_id, operator: "<")
+      put :update, params: project_params(id: alert.prometheus_metric_id, operator: "<")
 
       expect(response).to have_gitlab_http_status(:not_found)
     end
@@ -189,7 +189,7 @@
       }
 
       expect do
-        put :update, project_params(id: alert.prometheus_metric_id, operator: "<")
+        put :update, params: project_params(id: alert.prometheus_metric_id, operator: "<")
       end.to change { alert.reload.operator }.to("lt")
 
       expect(schedule_update_service).to have_received(:execute)
@@ -209,14 +209,14 @@
     it 'renders forbidden when unlicensed' do
       stub_licensed_features(prometheus_alerts: false)
 
-      delete :destroy, project_params(id: alert.prometheus_metric_id)
+      delete :destroy, params: project_params(id: alert.prometheus_metric_id)
 
       expect(response).to have_gitlab_http_status(:not_found)
     end
 
     it 'destroys the specified prometheus alert' do
       expect do
-        delete :destroy, project_params(id: alert.prometheus_metric_id)
+        delete :destroy, params: project_params(id: alert.prometheus_metric_id)
       end.to change { PrometheusAlert.count }.from(1).to(0)
 
       expect(schedule_update_service).to have_received(:execute)
diff --git a/ee/spec/controllers/projects/prometheus/metrics_controller_spec.rb b/ee/spec/controllers/projects/prometheus/metrics_controller_spec.rb
index 1199008ac3f7197e2393cb5dfad0e11919f1bf76..87cea7fc21c52de7fbb68af46d4b46f02d813337 100644
--- a/ee/spec/controllers/projects/prometheus/metrics_controller_spec.rb
+++ b/ee/spec/controllers/projects/prometheus/metrics_controller_spec.rb
@@ -25,7 +25,7 @@
       let(:validation_result) { { valid: true } }
 
       it 'validation data is returned' do
-        post :validate_query, project_params(format: :json, query: query)
+        post :validate_query, params: project_params(format: :json, query: query)
 
         expect(json_response).to eq('valid' => true)
       end
@@ -35,7 +35,7 @@
       let(:validation_result) { {} }
 
       it 'validation data is returned' do
-        post :validate_query, project_params(format: :json, query: query)
+        post :validate_query, params: project_params(format: :json, query: query)
 
         expect(response).to have_gitlab_http_status(204)
       end
@@ -47,7 +47,7 @@
       let!(:prometheus_metric) { create(:prometheus_metric, project: project) }
 
       it 'returns a list of metrics' do
-        get :index, project_params(format: :json)
+        get :index, params: project_params(format: :json)
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to match_response_schema('prometheus/metrics', dir: 'ee')
@@ -56,7 +56,7 @@
 
     context 'without custom metrics ' do
       it 'returns an empty json' do
-        get :index, project_params(format: :json)
+        get :index, params: project_params(format: :json)
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response).to eq({})
@@ -69,7 +69,7 @@
       let(:valid_metric) { { prometheus_metric: { title: 'title', query: 'query', group: 'business', y_label: 'label', unit: 'u', legend: 'legend' } } }
 
       it 'shows a success flash message' do
-        post :create, project_params(valid_metric)
+        post :create, params: project_params(valid_metric)
 
         expect(flash[:notice]).to include('Metric was successfully added.')
 
@@ -81,7 +81,7 @@
       let(:invalid_metric) { { prometheus_metric: { title: 'title' } } }
 
       it 'renders new metric page' do
-        post :create, project_params(invalid_metric)
+        post :create, params: project_params(invalid_metric)
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to render_template('new')
@@ -94,7 +94,7 @@
       let!(:metric) { create(:prometheus_metric, project: project) }
 
       it 'destroys the metric' do
-        delete :destroy, project_params(id: metric.id)
+        delete :destroy, params: project_params(id: metric.id)
 
         expect(response).to redirect_to(edit_project_service_path(project, PrometheusService))
         expect(PrometheusMetric.find_by(id: metric.id)).to be_nil
@@ -105,7 +105,7 @@
       let!(:metric) { create(:prometheus_metric, project: project) }
 
       it 'destroys the metric' do
-        delete :destroy, project_params(id: metric.id, format: :json)
+        delete :destroy, params: project_params(id: metric.id, format: :json)
 
         expect(response).to have_gitlab_http_status(200)
         expect(PrometheusMetric.find_by(id: metric.id)).to be_nil
diff --git a/ee/spec/controllers/projects/protected_environments_controller_spec.rb b/ee/spec/controllers/projects/protected_environments_controller_spec.rb
index 5e45f6688a50c20101fc6ffaa200d581e97c9ec6..8ee2459d3a5107d534672056db4b3ca04655c105 100644
--- a/ee/spec/controllers/projects/protected_environments_controller_spec.rb
+++ b/ee/spec/controllers/projects/protected_environments_controller_spec.rb
@@ -18,9 +18,11 @@
 
     subject do
       post :create,
-        namespace_id: project.namespace.to_param,
-        project_id: project.to_param,
-        protected_environment: params
+        params: {
+          namespace_id: project.namespace.to_param,
+          project_id: project.to_param,
+          protected_environment: params
+        }
     end
 
     context 'with valid access and params' do
@@ -97,10 +99,12 @@
 
     subject do
       put :update,
-        namespace_id: project.namespace.to_param,
-        project_id: project.to_param,
-        id: protected_environment.id,
-        protected_environment: params
+        params: {
+          namespace_id: project.namespace.to_param,
+          project_id: project.to_param,
+          id: protected_environment.id,
+          protected_environment: params
+        }
     end
 
     context 'when the user is authorized' do
@@ -141,9 +145,11 @@
 
     subject do
       delete :destroy,
-        namespace_id: project.namespace.to_param,
-        project_id: project.to_param,
-        id: protected_environment.id
+        params: {
+          namespace_id: project.namespace.to_param,
+          project_id: project.to_param,
+          id: protected_environment.id
+        }
     end
 
     context 'when the user is authorized' do
diff --git a/ee/spec/controllers/projects/push_rules_controller_spec.rb b/ee/spec/controllers/projects/push_rules_controller_spec.rb
index 0d8f17a40f914204e768a1bbadd438360d7adb3d..3001229a05d6ddb7e5922360b6d6534ad4cdd70d 100644
--- a/ee/spec/controllers/projects/push_rules_controller_spec.rb
+++ b/ee/spec/controllers/projects/push_rules_controller_spec.rb
@@ -12,7 +12,7 @@
 
   describe '#update' do
     def do_update
-      patch :update, namespace_id: project.namespace, project_id: project, id: 1, push_rule: { prevent_secrets: true }
+      patch :update, params: { namespace_id: project.namespace, project_id: project, id: 1, push_rule: { prevent_secrets: true } }
     end
 
     it 'updates the push rule' do
@@ -40,7 +40,7 @@ def do_update
           let(:user) { create(:admin) }
 
           it 'updates the setting' do
-            patch :update, namespace_id: project.namespace, project_id: project, id: 1, push_rule: { rule_attr => true }
+            patch :update, params: { namespace_id: project.namespace, project_id: project, id: 1, push_rule: { rule_attr => true } }
 
             expect(project.push_rule(true).public_send(rule_attr)).to be_truthy
           end
@@ -53,7 +53,7 @@ def do_update
 
           context 'when global setting is disabled' do
             it 'updates the setting' do
-              patch :update, namespace_id: project.namespace, project_id: project, id: 1, push_rule: { rule_attr => true }
+              patch :update, params: { namespace_id: project.namespace, project_id: project, id: 1, push_rule: { rule_attr => true } }
 
               expect(project.push_rule(true).public_send(rule_attr)).to be_truthy
             end
@@ -65,7 +65,7 @@ def do_update
             end
 
             it 'does not update the setting' do
-              patch :update, namespace_id: project.namespace, project_id: project, id: 1, push_rule: { rule_attr => false }
+              patch :update, params: { namespace_id: project.namespace, project_id: project, id: 1, push_rule: { rule_attr => false } }
 
               expect(project.push_rule(true).public_send(rule_attr)).to be_truthy
             end
@@ -78,7 +78,7 @@ def do_update
           end
 
           it 'does not update the setting' do
-            patch :update, namespace_id: project.namespace, project_id: project, id: 1, push_rule: { rule_attr => true }
+            patch :update, params: { namespace_id: project.namespace, project_id: project, id: 1, push_rule: { rule_attr => true } }
 
             expect(project.push_rule(true).public_send(rule_attr)).to be_falsy
           end
diff --git a/ee/spec/controllers/projects/security/dashboard_controller_spec.rb b/ee/spec/controllers/projects/security/dashboard_controller_spec.rb
index 48ad720f278e8efd3b5e6ddd3807270c43f791f1..c6aaa8082340f384991f8ba2f7cb15868442e2db 100644
--- a/ee/spec/controllers/projects/security/dashboard_controller_spec.rb
+++ b/ee/spec/controllers/projects/security/dashboard_controller_spec.rb
@@ -16,7 +16,7 @@
 
     def show_security_dashboard(current_user = user)
       sign_in(current_user)
-      get :show, namespace_id: project.namespace, project_id: project
+      get :show, params: { namespace_id: project.namespace, project_id: project }
     end
 
     context 'when security dashboard feature is enabled' do
diff --git a/ee/spec/controllers/projects/service_desk_controller_spec.rb b/ee/spec/controllers/projects/service_desk_controller_spec.rb
index a95634608f1ff6b6e20b057d9bdbd5098852fd0b..fe7e2afc1303355380353cc6254592794a3265e1 100644
--- a/ee/spec/controllers/projects/service_desk_controller_spec.rb
+++ b/ee/spec/controllers/projects/service_desk_controller_spec.rb
@@ -16,7 +16,7 @@
 
   describe 'GET service desk properties' do
     it 'returns service_desk JSON data' do
-      get :show, namespace_id: project.namespace.to_param, project_id: project, format: :json
+      get :show, params: { namespace_id: project.namespace.to_param, project_id: project }, format: :json
 
       body = JSON.parse(response.body)
 
@@ -32,7 +32,7 @@
         project.add_guest(guest)
         sign_in(guest)
 
-        get :show, namespace_id: project.namespace.to_param, project_id: project, format: :json
+        get :show, params: { namespace_id: project.namespace.to_param, project_id: project }, format: :json
 
         expect(response.status).to eq(404)
       end
@@ -43,7 +43,7 @@
     it 'toggles services desk incoming email' do
       project.update!(service_desk_enabled: false)
 
-      put :update, namespace_id: project.namespace.to_param, project_id: project, service_desk_enabled: true, format: :json
+      put :update, params: { namespace_id: project.namespace.to_param, project_id: project, service_desk_enabled: true }, format: :json
 
       body = JSON.parse(response.body)
 
@@ -57,7 +57,7 @@
 
       it 'renders 404' do
         sign_in(other_user)
-        put :update, namespace_id: project.namespace.to_param, project_id: project, service_desk_enabled: true, format: :json
+        put :update, params: { namespace_id: project.namespace.to_param, project_id: project, service_desk_enabled: true }, format: :json
 
         expect(response.status).to eq(404)
       end
diff --git a/ee/spec/controllers/projects/settings/integrations_controller_spec.rb b/ee/spec/controllers/projects/settings/integrations_controller_spec.rb
index 83c96d57c01d0d5f721f2ff50a8bbe1b1f7b5cfd..df234e234b064c1abdc18924ad0e95e54a338aba 100644
--- a/ee/spec/controllers/projects/settings/integrations_controller_spec.rb
+++ b/ee/spec/controllers/projects/settings/integrations_controller_spec.rb
@@ -11,7 +11,7 @@
 
   shared_examples 'endpoint with some disabled services' do
     it 'has some disabled services' do
-      get :show, namespace_id: project.namespace, project_id: project
+      get :show, params: { namespace_id: project.namespace, project_id: project }
 
       expect(active_services).not_to include(*disabled_services)
     end
@@ -19,7 +19,7 @@
 
   shared_examples 'endpoint without disabled services' do
     it 'does not have disabled services' do
-      get :show, namespace_id: project.namespace, project_id: project
+      get :show, params: { namespace_id: project.namespace, project_id: project }
 
       expect(active_services).to include(*disabled_services)
     end
@@ -30,7 +30,7 @@
     let(:disabled_services) { %w(JenkinsService JenkinsDeprecatedService) }
 
     it 'enables SlackSlashCommandsService and disables GitlabSlackApplication' do
-      get :show, namespace_id: project.namespace, project_id: project
+      get :show, params: { namespace_id: project.namespace, project_id: project }
 
       expect(active_services).to include('SlackSlashCommandsService')
       expect(active_services).not_to include('GitlabSlackApplicationService')
@@ -40,7 +40,7 @@
       stub_application_setting(slack_app_enabled: true)
       allow(::Gitlab).to receive(:com?).and_return(true)
 
-      get :show, namespace_id: project.namespace, project_id: project
+      get :show, params: { namespace_id: project.namespace, project_id: project }
 
       expect(active_services).to include('GitlabSlackApplicationService')
       expect(active_services).not_to include('SlackSlashCommandsService')
diff --git a/ee/spec/controllers/projects/settings/operations_controller_spec.rb b/ee/spec/controllers/projects/settings/operations_controller_spec.rb
index a27e56d0c9873f4c48089b91e98b0c31f045cd94..22cf0783567b5c3d3fba1de885de087b54cc1ade 100644
--- a/ee/spec/controllers/projects/settings/operations_controller_spec.rb
+++ b/ee/spec/controllers/projects/settings/operations_controller_spec.rb
@@ -19,7 +19,7 @@
         end
 
         it 'returns 404' do
-          get :show, namespace_id: project.namespace, project_id: project
+          get :show, params: { namespace_id: project.namespace, project_id: project }
 
           expect(response).to have_gitlab_http_status(:not_found)
         end
@@ -34,7 +34,7 @@
       end
 
       it 'renders ok' do
-        get :show, namespace_id: project.namespace, project_id: project
+        get :show, params: { namespace_id: project.namespace, project_id: project }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to render_template(:show)
@@ -45,7 +45,7 @@
       it 'redirects for private project' do
         project = create(:project, project_visibility)
 
-        get :show, namespace_id: project.namespace, project_id: project
+        get :show, params: { namespace_id: project.namespace, project_id: project }
 
         expect(response).to redirect_to(new_user_session_path)
       end
@@ -230,7 +230,7 @@ def project_params(project, params = {})
     end
 
     def update_project(project, params)
-      patch :update, project_params(project, params)
+      patch :update, params: project_params(project, params)
 
       project.reload
     end
diff --git a/ee/spec/controllers/projects/settings/repository_controller_spec.rb b/ee/spec/controllers/projects/settings/repository_controller_spec.rb
index 2c05e65bf2b7cd00d89b15fb0448bae75511e7ec..d735373b318eed0246aa0621b4f310466617eb29 100644
--- a/ee/spec/controllers/projects/settings/repository_controller_spec.rb
+++ b/ee/spec/controllers/projects/settings/repository_controller_spec.rb
@@ -14,7 +14,7 @@
       subject(:push_rule) { assigns(:push_rule) }
 
       it 'is created' do
-        get :show, namespace_id: project.namespace, project_id: project
+        get :show, params: { namespace_id: project.namespace, project_id: project }
 
         is_expected.to be_persisted
       end
@@ -25,7 +25,7 @@
         end
 
         it 'is not created' do
-          get :show, namespace_id: project.namespace, project_id: project
+          get :show, params: { namespace_id: project.namespace, project_id: project }
 
           is_expected.to be_nil
         end
diff --git a/ee/spec/controllers/projects/settings/slacks_controller_spec.rb b/ee/spec/controllers/projects/settings/slacks_controller_spec.rb
index 6a81ad81fee5c9459c066d39d0e699ec9c49a908..52b2ecae1ebcafc9b13616509fa77229db5763df 100644
--- a/ee/spec/controllers/projects/settings/slacks_controller_spec.rb
+++ b/ee/spec/controllers/projects/settings/slacks_controller_spec.rb
@@ -32,7 +32,7 @@ def stub_service(result)
       it 'calls service and redirects with no alerts if result is successful' do
         stub_service(status: :success)
 
-        get :slack_auth, namespace_id: project.namespace, project_id: project
+        get :slack_auth, params: { namespace_id: project.namespace, project_id: project }
 
         expect(response).to have_gitlab_http_status(302)
         expect(response).to redirect_to(redirect_url(project))
@@ -42,7 +42,7 @@ def stub_service(result)
       it 'calls service and redirects with the alert if there is error' do
         stub_service(status: :error, message: 'error')
 
-        get :slack_auth, namespace_id: project.namespace, project_id: project
+        get :slack_auth, params: { namespace_id: project.namespace, project_id: project }
 
         expect(response).to have_gitlab_http_status(302)
         expect(response).to redirect_to(redirect_url(project))
@@ -52,7 +52,7 @@ def stub_service(result)
 
     context 'when no CSRF token is provided' do
       it 'returns 403' do
-        get :slack_auth, namespace_id: project.namespace, project_id: project
+        get :slack_auth, params: { namespace_id: project.namespace, project_id: project }
 
         expect(response).to have_gitlab_http_status(403)
       end
diff --git a/ee/spec/controllers/projects/tracings_controller_spec.rb b/ee/spec/controllers/projects/tracings_controller_spec.rb
index eace5752a5483ed7f24ef034c20c1c726b8f4e71..f255e183d82de0d6d6cabc6638e074d73edf300e 100644
--- a/ee/spec/controllers/projects/tracings_controller_spec.rb
+++ b/ee/spec/controllers/projects/tracings_controller_spec.rb
@@ -14,7 +14,7 @@
       end
 
       it 'renders OK' do
-        get :show, namespace_id: project.namespace, project_id: project
+        get :show, params: { namespace_id: project.namespace, project_id: project }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to render_template(:show)
@@ -30,7 +30,7 @@
         end
 
         it 'returns 404' do
-          get :show, namespace_id: project.namespace, project_id: project
+          get :show, params: { namespace_id: project.namespace, project_id: project }
 
           expect(response).to have_gitlab_http_status(:not_found)
         end
diff --git a/ee/spec/controllers/projects/variables_controller_spec.rb b/ee/spec/controllers/projects/variables_controller_spec.rb
index b1bf99760f64cd7289aa9580b72189e1439a40c5..5079764bf759a3aeaea8ec49cb7fc06d8be2ee1c 100644
--- a/ee/spec/controllers/projects/variables_controller_spec.rb
+++ b/ee/spec/controllers/projects/variables_controller_spec.rb
@@ -32,9 +32,11 @@
 
     subject do
       patch :update,
-        namespace_id: project.namespace.to_param,
-        project_id: project,
-        variables_attributes: variables_attributes,
+        params: {
+          namespace_id: project.namespace.to_param,
+          project_id: project,
+          variables_attributes: variables_attributes
+        },
         format: :json
     end
 
diff --git a/ee/spec/controllers/projects/vulnerability_feedback_controller_spec.rb b/ee/spec/controllers/projects/vulnerability_feedback_controller_spec.rb
index 9d13155bb583d1e052c4155351abcb35d3b8b5e9..b0ed528547792e4eea052dd90ce794fd41a22cae 100644
--- a/ee/spec/controllers/projects/vulnerability_feedback_controller_spec.rb
+++ b/ee/spec/controllers/projects/vulnerability_feedback_controller_spec.rb
@@ -75,7 +75,7 @@
     end
 
     def list_feedbacks(params = {})
-      get :index, { namespace_id: project.namespace.to_param, project_id: project }.merge(params)
+      get :index, params: { namespace_id: project.namespace.to_param, project_id: project }.merge(params)
     end
   end
 
@@ -215,7 +215,7 @@ def create_feedback(user:, project:, params:)
     def destroy_feedback(user:, project:, id:)
       sign_in(user)
 
-      delete :destroy, namespace_id: project.namespace.to_param, project_id: project, id: id
+      delete :destroy, params: { namespace_id: project.namespace.to_param, project_id: project, id: id }
     end
   end
 end
diff --git a/ee/spec/controllers/projects/web_ide_terminals_controller_spec.rb b/ee/spec/controllers/projects/web_ide_terminals_controller_spec.rb
index d2ddedf17e5116594bed9f999071169814eec96a..2f5a57de1f42b3ced7bf65a20d681818ef775b8c 100644
--- a/ee/spec/controllers/projects/web_ide_terminals_controller_spec.rb
+++ b/ee/spec/controllers/projects/web_ide_terminals_controller_spec.rb
@@ -96,7 +96,7 @@
 
   describe 'GET show' do
     before do
-      get(:show, namespace_id: project.namespace.to_param, project_id: project, id: job.id)
+      get(:show, params: { namespace_id: project.namespace.to_param, project_id: project, id: job.id })
     end
 
     it_behaves_like 'terminal access rights'
@@ -110,9 +110,11 @@
       allow_any_instance_of(::Ci::WebIdeConfigService)
         .to receive(:execute).and_return(result)
 
-      post :check_config, namespace_id: project.namespace.to_param,
-                          project_id: project.to_param,
-                          branch: 'master'
+      post :check_config, params: {
+                            namespace_id: project.namespace.to_param,
+                            project_id: project.to_param,
+                            branch: 'master'
+                          }
     end
 
     it_behaves_like 'terminal access rights'
@@ -131,9 +133,11 @@
     let(:branch) { 'master' }
 
     subject do
-      post :create, namespace_id: project.namespace.to_param,
-                    project_id: project.to_param,
-                    branch: branch
+      post :create, params: {
+                      namespace_id: project.namespace.to_param,
+                      project_id: project.to_param,
+                      branch: branch
+                    }
     end
 
     context 'access rights' do
@@ -179,9 +183,11 @@
     let(:job) { create(:ci_build, :running, pipeline: pipeline, user: user, project: project) }
 
     before do
-      post(:cancel, namespace_id: project.namespace.to_param,
-                    project_id: project.to_param,
-                    id: job.id)
+      post(:cancel, params: {
+                      namespace_id: project.namespace.to_param,
+                      project_id: project.to_param,
+                      id: job.id
+                    })
     end
 
     it_behaves_like 'terminal access rights'
@@ -200,9 +206,11 @@
     let(:job) { create(:ci_build, :failed, pipeline: pipeline, user: user, project: project) }
 
     before do
-      post(:retry, namespace_id: project.namespace.to_param,
-                   project_id: project.to_param,
-                   id: job.id)
+      post(:retry, params: {
+                     namespace_id: project.namespace.to_param,
+                     project_id: project.to_param,
+                     id: job.id
+                   })
     end
 
     it_behaves_like 'terminal access rights'
diff --git a/ee/spec/controllers/projects_controller_spec.rb b/ee/spec/controllers/projects_controller_spec.rb
index 3d2170812b1a49005b201a41772a5b0b2533070c..0afc5794d2e866fa7e0953d2e66fd6f3b388e2e0 100644
--- a/ee/spec/controllers/projects_controller_spec.rb
+++ b/ee/spec/controllers/projects_controller_spec.rb
@@ -30,7 +30,7 @@
       end
 
       it 'has mirror enabled in new project' do
-        post :create, project: params
+        post :create, params: { project: params }
 
         created_project = Project.find_by_path('foo')
         expect(created_project.reload.mirror).to be true
@@ -44,7 +44,7 @@
       end
 
       it 'has mirror disabled in new project' do
-        post :create, project: params
+        post :create, params: { project: params }
 
         created_project = Project.find_by_path('foo')
         expect(created_project.reload.mirror).to be false
@@ -77,7 +77,7 @@
           end
 
           it 'creates the project from project template' do
-            post :create, project: templates_params
+            post :create, params: { project: templates_params }
 
             created_project = Project.find_by_path('foo')
             expect(flash[:notice]).to eq "Project 'foo' was successfully created."
@@ -92,7 +92,7 @@
         end
 
         it 'creates the project from project template' do
-          post :create, project: templates_params
+          post :create, params: { project: templates_params }
 
           created_project = Project.find_by_path('foo')
           expect(flash[:notice]).to eq "Project 'foo' was successfully created."
@@ -109,9 +109,11 @@
       }
 
       put :update,
-          namespace_id: project.namespace,
-          id: project,
-          project: params
+          params: {
+            namespace_id: project.namespace,
+            id: project,
+            project: params
+          }
       project.reload
 
       expect(response).to have_gitlab_http_status(302)
@@ -130,9 +132,11 @@
       }
 
       put :update,
-          namespace_id: project.namespace,
-          id: project,
-          project: params
+          params: {
+            namespace_id: project.namespace,
+            id: project,
+            project: params
+          }
       project.reload
 
       expect(response).to have_gitlab_http_status(302)
@@ -147,9 +151,11 @@
       }
 
       put :update,
-          namespace_id: project.namespace,
-          id: project,
-          project: params
+          params: {
+            namespace_id: project.namespace,
+            id: project,
+            project: params
+          }
       project.reload
 
       expect(response).to have_gitlab_http_status(302)
@@ -167,9 +173,11 @@
       }
 
       put :update,
-          namespace_id: project.namespace,
-          id: project,
-          project: params
+          params: {
+            namespace_id: project.namespace,
+            id: project,
+            project: params
+          }
       project.reload
 
       expect(response).to have_gitlab_http_status(302)
@@ -195,9 +203,11 @@
           expect_any_instance_of(EE::ProjectImportState).to receive(:force_import_job!).once
 
           put :update,
-            namespace_id: project.namespace,
-            id: project,
-            project: params
+            params: {
+              namespace_id: project.namespace,
+              id: project,
+              project: params
+            }
           project.reload
 
           expect(project.mirror).to eq(true)
@@ -216,9 +226,11 @@
           params.each do |param, _value|
             expect do
               put :update,
-                namespace_id: project.namespace,
-                id: project,
-                project: params
+                params: {
+                  namespace_id: project.namespace,
+                  id: project,
+                  project: params
+                }
               project.reload
             end.not_to change(project, param)
           end
@@ -229,9 +241,11 @@
     it_behaves_like 'unauthorized when external service denies access' do
       subject do
         put :update,
-            namespace_id: project.namespace,
-            id: project,
-            project: { description: 'Hello world' }
+            params: {
+              namespace_id: project.namespace,
+              id: project,
+              project: { description: 'Hello world' }
+            }
         project.reload
       end
 
diff --git a/ee/spec/controllers/registrations_controller_spec.rb b/ee/spec/controllers/registrations_controller_spec.rb
index f12038c531cc64da08692044caf6fa55781177eb..5f06070c9008fef3394d04b132159088911e8230 100644
--- a/ee/spec/controllers/registrations_controller_spec.rb
+++ b/ee/spec/controllers/registrations_controller_spec.rb
@@ -6,7 +6,7 @@
       let(:user_params) { { user: attributes_for(:user, email_opted_in: '1') } }
 
       it 'sets the rest of the email_opted_in fields' do
-        post :create, user_params
+        post :create, params: user_params
         user = User.find_by_username!(user_params[:user][:username])
         expect(user.email_opted_in).to be_truthy
         expect(user.email_opted_in_ip).to be_present
@@ -19,7 +19,7 @@
       let(:user_params) { { user: attributes_for(:user, email_opted_in: '0') } }
 
       it 'does not set the rest of the email_opted_in fields' do
-        post :create, user_params
+        post :create, params: user_params
         user = User.find_by_username!(user_params[:user][:username])
         expect(user.email_opted_in).to be_falsey
         expect(user.email_opted_in_ip).to be_blank
diff --git a/ee/spec/controllers/search_controller_spec.rb b/ee/spec/controllers/search_controller_spec.rb
index 56b07aa639ded192a19b0b20865860f9cfa0cacd..8f31a6a047964460bbcdac726a560461d3712a89 100644
--- a/ee/spec/controllers/search_controller_spec.rb
+++ b/ee/spec/controllers/search_controller_spec.rb
@@ -18,13 +18,13 @@
 
     describe 'GET #show' do
       it 'renders a 403 when no project is given' do
-        get :show, scope: 'notes', search: note.note
+        get :show, params: { scope: 'notes', search: note.note }
 
         expect(response).to have_gitlab_http_status(403)
       end
 
       it 'renders a 200 when a project was set' do
-        get :show, project_id: project.id, scope: 'notes', search: note.note
+        get :show, params: { project_id: project.id, scope: 'notes', search: note.note }
 
         expect(response).to have_gitlab_http_status(200)
       end
@@ -32,13 +32,13 @@
 
     describe 'GET #autocomplete' do
       it 'renders a 403 when no project is given' do
-        get :autocomplete, term: 'hello'
+        get :autocomplete, params: { term: 'hello' }
 
         expect(response).to have_gitlab_http_status(403)
       end
 
       it 'renders a 200 when a project was set' do
-        get :autocomplete, project_id: project.id, term: 'hello'
+        get :autocomplete, params: { project_id: project.id, term: 'hello' }
 
         expect(response).to have_gitlab_http_status(200)
       end
diff --git a/ee/spec/controllers/unsubscribes_controller_spec.rb b/ee/spec/controllers/unsubscribes_controller_spec.rb
index ea9fe79a25f721777d56c045ce9556e01b4cb34a..145a6434a00b43ecb3d6b2dcb5198bde00681bf4 100644
--- a/ee/spec/controllers/unsubscribes_controller_spec.rb
+++ b/ee/spec/controllers/unsubscribes_controller_spec.rb
@@ -5,13 +5,13 @@
 
   describe "show" do
     it "responds with success" do
-      get :show, email:  Base64.urlsafe_encode64('me@example.com')
+      get :show, params: { email:  Base64.urlsafe_encode64('me@example.com') }
 
       assert_response :success
     end
 
     it "behaves the same if email address isn't known in the system" do
-      get :show, email: Base64.urlsafe_encode64('i@dont_exists.com')
+      get :show, params: { email: Base64.urlsafe_encode64('i@dont_exists.com') }
 
       assert_response :success
     end
@@ -19,14 +19,14 @@
 
   describe "create" do
     it "unsubscribes the connected user" do
-      post :create, email: Base64.urlsafe_encode64('me@example.com')
+      post :create, params: { email: Base64.urlsafe_encode64('me@example.com') }
 
       assert user.reload.admin_email_unsubscribed_at
     end
 
     # Don't tell if the email does not exists
     it "behaves the same if email address isn't known in the system" do
-      post :create, email: Base64.urlsafe_encode64('i@dont_exists.com')
+      post :create, params: { email: Base64.urlsafe_encode64('i@dont_exists.com') }
 
       assert_response :redirect
     end
diff --git a/ee/spec/controllers/users_controller_spec.rb b/ee/spec/controllers/users_controller_spec.rb
index 12646981c8c028c277ea24885f16aa41b92bfc10..e0b6f263b0eaba464111ccbb2d2220856f27b3a8 100644
--- a/ee/spec/controllers/users_controller_spec.rb
+++ b/ee/spec/controllers/users_controller_spec.rb
@@ -8,13 +8,13 @@
   end
 
   describe 'GET #snippets' do
-    subject { get :snippets, username: user.username }
+    subject { get :snippets, params: { username: user.username } }
 
     it_behaves_like 'disabled when using an external authorization service'
   end
 
   describe 'GET #calendar_activities' do
-    subject { get :calendar_activities, username: user.username }
+    subject { get :calendar_activities, params: { username: user.username } }
 
     it_behaves_like 'disabled when using an external authorization service'
   end
diff --git a/ee/spec/javascripts/fixtures/merge_requests.rb b/ee/spec/javascripts/fixtures/merge_requests.rb
index 62e1b6cafb47c5a4e0325af71b01c7c017a92790..ca95331d76fc4e51822ee8c887156380319af7db 100644
--- a/ee/spec/javascripts/fixtures/merge_requests.rb
+++ b/ee/spec/javascripts/fixtures/merge_requests.rb
@@ -36,9 +36,11 @@
 
   it 'merge_requests_ee/merge_request_edit.html.raw' do |example|
     get :edit,
-      id: merge_request.id,
-      namespace_id: project.namespace.to_param,
-      project_id: project,
+      params: {
+        id: merge_request.id,
+        namespace_id: project.namespace.to_param,
+        project_id: project
+      },
       format: :html
 
     expect(merge_request.all_approvers_including_groups.size).to eq(1)
diff --git a/ee/spec/javascripts/fixtures/saml_providers.rb b/ee/spec/javascripts/fixtures/saml_providers.rb
index a13aeaa77f034d8b78ca6693ac1a316c10748707..70a5ecd19c25583c4f013489d2233cc0689efdfe 100644
--- a/ee/spec/javascripts/fixtures/saml_providers.rb
+++ b/ee/spec/javascripts/fixtures/saml_providers.rb
@@ -23,7 +23,7 @@
   it 'groups/saml_providers/show.html.raw' do |example|
     create(:saml_provider, group: group)
 
-    get :show, group_id: group
+    get :show, params: { group_id: group }
 
     expect(response).to be_success
     expect(response).to render_template 'groups/saml_providers/show'
diff --git a/ee/spec/lib/ee/api/helpers_spec.rb b/ee/spec/lib/ee/api/helpers_spec.rb
index 2028559983f093c160bf3a40f6a7d6100c1131ca..dc97f87bb9ad848ab11756096ad4ada77b7adc80 100644
--- a/ee/spec/lib/ee/api/helpers_spec.rb
+++ b/ee/spec/lib/ee/api/helpers_spec.rb
@@ -67,7 +67,7 @@ def app
       expect_any_instance_of(::Gitlab::Geo::JwtRequestDecoder).to receive(:decode) { raise ::Gitlab::Geo::InvalidDecryptionKeyError }
 
       header 'Authorization', 'test'
-      get 'protected', current_user: 'test'
+      get 'protected', params: { current_user: 'test' }
 
       expect(JSON.parse(last_response.body)).to eq({ 'message' => 'Gitlab::Geo::InvalidDecryptionKeyError' })
     end
@@ -76,7 +76,7 @@ def app
       allow_any_instance_of(::Gitlab::Geo::JwtRequestDecoder).to receive(:decode) { raise ::Gitlab::Geo::InvalidSignatureTimeError }
 
       header 'Authorization', 'test'
-      get 'protected', current_user: 'test'
+      get 'protected', params: { current_user: 'test' }
 
       expect(JSON.parse(last_response.body)).to eq({ 'message' => 'Gitlab::Geo::InvalidSignatureTimeError' })
     end
diff --git a/ee/spec/requests/api/epics_spec.rb b/ee/spec/requests/api/epics_spec.rb
index 3306ea25c8c3fb40076aac942b9fbc672ad379ce..c9de7c4c5b1b0947f9bc5bd1caddbf5f73bd1182 100644
--- a/ee/spec/requests/api/epics_spec.rb
+++ b/ee/spec/requests/api/epics_spec.rb
@@ -12,7 +12,7 @@
       it 'returns 403 forbidden error' do
         group.add_developer(user)
 
-        get api(url, user), params
+        get api(url, user), params: params
 
         expect(response).to have_gitlab_http_status(403)
       end
@@ -23,7 +23,7 @@
         end
 
         it 'returns 401 unauthorized error for non authenticated user' do
-          get api(url), params
+          get api(url), params: params
 
           expect(response).to have_gitlab_http_status(401)
         end
@@ -32,7 +32,7 @@
           project.update(visibility_level: Gitlab::VisibilityLevel::PRIVATE)
           group.update(visibility_level: Gitlab::VisibilityLevel::PRIVATE)
 
-          get api(url, user), params
+          get api(url, user), params: params
 
           expect(response).to have_gitlab_http_status(404)
         end
@@ -47,7 +47,7 @@
       RSpec::Matchers.define_negated_matcher :exclude, :include
 
       it 'returns epic with extra date fields' do
-        get api(url, user), params
+        get api(url, user), params: params
 
         expect(Array.wrap(JSON.parse(response.body))).to all(exclude(*extra_date_fields))
       end
@@ -59,7 +59,7 @@
       end
 
       it 'returns epic with extra date fields' do
-        get api(url, user), params
+        get api(url, user), params: params
 
         expect(Array.wrap(JSON.parse(response.body))).to all(include(*extra_date_fields))
       end
@@ -119,31 +119,31 @@ def expect_array_response(expected)
       end
 
       it 'returns epics authored by the given author id' do
-        get api(url, user), author_id: user2.id
+        get api(url, user), params: { author_id: user2.id }
 
         expect_array_response([epic2.id])
       end
 
       it 'returns epics matching given search string for title' do
-        get api(url, user), search: epic2.title
+        get api(url, user), params: { search: epic2.title }
 
         expect_array_response([epic2.id])
       end
 
       it 'returns epics matching given search string for description' do
-        get api(url, user), search: epic2.description
+        get api(url, user), params: { search: epic2.description }
 
         expect_array_response([epic2.id])
       end
 
       it 'returns epics matching given status' do
-        get api(url, user), state: :opened
+        get api(url, user), params: { state: :opened }
 
         expect_array_response([epic2.id])
       end
 
       it 'returns all epics when state set to all' do
-        get api(url, user), state: :all
+        get api(url, user), params: { state: :all }
 
         expect_array_response([epic2.id, epic.id])
       end
@@ -155,25 +155,25 @@ def expect_array_response(expected)
       end
 
       it 'sorts ascending when requested' do
-        get api(url, user), sort: :asc
+        get api(url, user), params: { sort: :asc }
 
         expect_array_response([epic.id, epic2.id])
       end
 
       it 'sorts by updated_at descending when requested' do
-        get api(url, user), order_by: :updated_at
+        get api(url, user), params: { order_by: :updated_at }
 
         expect_array_response([epic.id, epic2.id])
       end
 
       it 'sorts by updated_at ascending when requested' do
-        get api(url, user), order_by: :updated_at, sort: :asc
+        get api(url, user), params: { order_by: :updated_at, sort: :asc }
 
         expect_array_response([epic2.id, epic.id])
       end
 
       it 'returns an array of labeled epics' do
-        get api(url, user), labels: label.title
+        get api(url, user), params: { labels: label.title }
 
         expect_array_response([epic2.id])
       end
@@ -231,7 +231,7 @@ def expect_array_response(expected)
         it 'returns 400' do
           group.add_developer(user)
 
-          post api(url, user), description: 'epic description'
+          post api(url, user), params: { description: 'epic description' }
 
           expect(response).to have_gitlab_http_status(400)
         end
@@ -241,7 +241,7 @@ def expect_array_response(expected)
         before do
           group.add_developer(user)
 
-          post api(url, user), params
+          post api(url, user), params: params
         end
 
         it 'returns 201 status' do
@@ -301,7 +301,7 @@ def expect_array_response(expected)
 
       context 'when a user does not have permissions to create an epic' do
         it 'returns 403 forbidden error' do
-          put api(url, user), params
+          put api(url, user), params: params
 
           expect(response).to have_gitlab_http_status(403)
         end
@@ -324,7 +324,7 @@ def expect_array_response(expected)
 
         context 'with basic params' do
           before do
-            put api(url, user), params
+            put api(url, user), params: params
           end
 
           it 'returns 200 status' do
@@ -351,7 +351,7 @@ def expect_array_response(expected)
 
         context 'when state_event is close' do
           it 'allows epic to be closed' do
-            put api(url, user), state_event: 'close'
+            put api(url, user), params: { state_event: 'close' }
 
             expect(epic.reload).to be_closed
           end
@@ -361,7 +361,7 @@ def expect_array_response(expected)
           it 'allows epic to be reopend' do
             epic.update!(state: 'closed')
 
-            put api(url, user), state_event: 'reopen'
+            put api(url, user), params: { state_event: 'reopen' }
 
             expect(epic.reload).to be_opened
           end
@@ -373,7 +373,7 @@ def expect_array_response(expected)
           let(:new_due_date) { epic.end_date + 1.day }
 
           it 'updates start_date_fixed and due_date_fixed' do
-            put api(url, user), start_date: new_start_date, end_date: new_due_date
+            put api(url, user), params: { start_date: new_start_date, end_date: new_due_date }
 
             result = epic.reload
 
@@ -388,7 +388,7 @@ def expect_array_response(expected)
           let(:new_due_date) { epic.end_date + 1.day }
 
           it 'updates start_date_is_fixed' do
-            put api(url, user), start_date_is_fixed: false
+            put api(url, user), params: { start_date_is_fixed: false }
 
             result = epic.reload
 
diff --git a/ee/spec/requests/api/geo_nodes_spec.rb b/ee/spec/requests/api/geo_nodes_spec.rb
index 5c2290fa6e7fe5aa895a9b876dbdc2f87ad45ce8..0c1c6456efb6904ae2fcb680d3f99d239604a33e 100644
--- a/ee/spec/requests/api/geo_nodes_spec.rb
+++ b/ee/spec/requests/api/geo_nodes_spec.rb
@@ -199,11 +199,11 @@
 
   describe 'PUT /geo_nodes/:id' do
     it_behaves_like '404 response' do
-      let(:request) { put api("/geo_nodes/#{unexisting_node_id}", admin), {} }
+      let(:request) { put api("/geo_nodes/#{unexisting_node_id}", admin), params: {} }
     end
 
     it 'denies access if not admin' do
-      put api("/geo_nodes/#{secondary.id}", user), {}
+      put api("/geo_nodes/#{secondary.id}", user), params: {}
 
       expect(response).to have_gitlab_http_status(403)
     end
@@ -217,7 +217,7 @@
         verification_max_capacity: 55
       }.stringify_keys
 
-      put api("/geo_nodes/#{secondary.id}", admin), params
+      put api("/geo_nodes/#{secondary.id}", admin), params: params
 
       expect(response).to have_gitlab_http_status(200)
       expect(response).to match_response_schema('public_api/v4/geo_node', dir: 'ee')
@@ -293,7 +293,7 @@
           create(:geo_project_registry, :wiki_sync_failed)
           create(:geo_project_registry, :repository_sync_failed)
 
-          get api("/geo_nodes/current/failures", admin), type: :wiki
+          get api("/geo_nodes/current/failures", admin), params: { type: :wiki }
 
           expect(response).to have_gitlab_http_status(200)
           expect(json_response.count).to eq(1)
@@ -306,7 +306,7 @@
           create(:geo_project_registry, :wiki_sync_failed)
           create(:geo_project_registry, :repository_sync_failed)
 
-          get api("/geo_nodes/current/failures", admin), type: :repository
+          get api("/geo_nodes/current/failures", admin), params: { type: :repository }
 
           expect(response).to have_gitlab_http_status(200)
           expect(json_response.count).to eq(1)
@@ -318,7 +318,7 @@
         it 'returns a bad request' do
           create(:geo_project_registry, :repository_sync_failed)
 
-          get api("/geo_nodes/current/failures", admin), type: :nonexistent
+          get api("/geo_nodes/current/failures", admin), params: { type: :nonexistent }
 
           expect(response).to have_gitlab_http_status(400)
         end
@@ -339,7 +339,7 @@
           create(:geo_project_registry, :repository_verification_failed)
           create(:geo_project_registry, :wiki_verification_failed)
 
-          get api("/geo_nodes/current/failures", admin), failure_type: 'verification'
+          get api("/geo_nodes/current/failures", admin), params: { failure_type: 'verification' }
 
           expect(response).to have_gitlab_http_status(200)
           expect(response).to match_response_schema('public_api/v4/geo_project_registry', dir: 'ee')
@@ -348,7 +348,7 @@
         it 'does not show any registry when there is no failure' do
           create(:geo_project_registry, :repository_verified)
 
-          get api("/geo_nodes/current/failures", admin), failure_type: 'verification'
+          get api("/geo_nodes/current/failures", admin), params: { failure_type: 'verification' }
 
           expect(response).to have_gitlab_http_status(200)
           expect(json_response.count).to be_zero
@@ -359,7 +359,7 @@
             create(:geo_project_registry, :repository_verification_failed)
             create(:geo_project_registry, :wiki_verification_failed)
 
-            get api("/geo_nodes/current/failures", admin), failure_type: 'verification', type: :wiki
+            get api("/geo_nodes/current/failures", admin), params: { failure_type: 'verification', type: :wiki }
 
             expect(response).to have_gitlab_http_status(200)
             expect(json_response.count).to eq(1)
@@ -372,7 +372,7 @@
             create(:geo_project_registry, :repository_verification_failed)
             create(:geo_project_registry, :wiki_verification_failed)
 
-            get api("/geo_nodes/current/failures", admin), failure_type: 'verification', type: :repository
+            get api("/geo_nodes/current/failures", admin), params: { failure_type: 'verification', type: :repository }
 
             expect(response).to have_gitlab_http_status(200)
             expect(json_response.count).to eq(1)
@@ -390,7 +390,7 @@
           create(:geo_project_registry, :repository_checksum_mismatch)
           create(:geo_project_registry, :wiki_checksum_mismatch)
 
-          get api("/geo_nodes/current/failures", admin), failure_type: 'checksum_mismatch'
+          get api("/geo_nodes/current/failures", admin), params: { failure_type: 'checksum_mismatch' }
 
           expect(response).to have_gitlab_http_status(200)
           expect(response).to match_response_schema('public_api/v4/geo_project_registry', dir: 'ee')
@@ -399,7 +399,7 @@
         it 'does not show any registry when there is no failure' do
           create(:geo_project_registry, :repository_verified)
 
-          get api("/geo_nodes/current/failures", admin), failure_type: 'checksum_mismatch'
+          get api("/geo_nodes/current/failures", admin), params: { failure_type: 'checksum_mismatch' }
 
           expect(response).to have_gitlab_http_status(200)
           expect(json_response.count).to be_zero
@@ -410,7 +410,7 @@
             create(:geo_project_registry, :repository_checksum_mismatch)
             create(:geo_project_registry, :wiki_checksum_mismatch)
 
-            get api("/geo_nodes/current/failures", admin), failure_type: 'checksum_mismatch', type: :wiki
+            get api("/geo_nodes/current/failures", admin), params: { failure_type: 'checksum_mismatch', type: :wiki }
 
             expect(response).to have_gitlab_http_status(200)
             expect(json_response.count).to eq(1)
@@ -423,7 +423,7 @@
             create(:geo_project_registry, :repository_checksum_mismatch)
             create(:geo_project_registry, :wiki_checksum_mismatch)
 
-            get api("/geo_nodes/current/failures", admin), failure_type: 'checksum_mismatch', type: :repository
+            get api("/geo_nodes/current/failures", admin), params: { failure_type: 'checksum_mismatch', type: :repository }
 
             expect(response).to have_gitlab_http_status(200)
             expect(json_response.count).to eq(1)
diff --git a/ee/spec/requests/api/geo_spec.rb b/ee/spec/requests/api/geo_spec.rb
index 234ac963ee3a91a18eefbc5b372f9f58fe15c004..5f7f3b4fd00c1907c4c4e3562bb73b78b56df63c 100644
--- a/ee/spec/requests/api/geo_spec.rb
+++ b/ee/spec/requests/api/geo_spec.rb
@@ -41,13 +41,13 @@
       end
 
       it 'responds with 401 with invalid auth header' do
-        get api("/geo/transfers/attachment/#{upload.id}"), nil, Authorization: 'Test'
+        get api("/geo/transfers/attachment/#{upload.id}"), headers: { Authorization: 'Test' }
 
         expect(response).to have_gitlab_http_status(401)
       end
 
       context 'attachment file exists' do
-        subject(:request) { get api("/geo/transfers/attachment/#{upload.id}"), nil, req_header }
+        subject(:request) { get api("/geo/transfers/attachment/#{upload.id}"), headers: req_header }
 
         it 'responds with 200 with X-Sendfile' do
           request
@@ -62,7 +62,7 @@
 
       context 'attachment does not exist' do
         it 'responds with 404' do
-          get api("/geo/transfers/attachment/100000"), nil, req_header
+          get api("/geo/transfers/attachment/100000"), headers: req_header
 
           expect(response).to have_gitlab_http_status(404)
         end
@@ -80,13 +80,13 @@
       end
 
       it 'responds with 401 with invalid auth header' do
-        get api("/geo/transfers/avatar/#{upload.id}"), nil, Authorization: 'Test'
+        get api("/geo/transfers/avatar/#{upload.id}"), headers: { Authorization: 'Test' }
 
         expect(response).to have_gitlab_http_status(401)
       end
 
       context 'avatar file exists' do
-        subject(:request) { get api("/geo/transfers/avatar/#{upload.id}"), nil, req_header }
+        subject(:request) { get api("/geo/transfers/avatar/#{upload.id}"), headers: req_header }
 
         it 'responds with 200 with X-Sendfile' do
           request
@@ -101,7 +101,7 @@
 
       context 'avatar does not exist' do
         it 'responds with 404' do
-          get api("/geo/transfers/avatar/100000"), nil, req_header
+          get api("/geo/transfers/avatar/100000"), headers: req_header
 
           expect(response).to have_gitlab_http_status(404)
         end
@@ -120,14 +120,14 @@
       end
 
       it 'responds with 401 with invalid auth header' do
-        get api("/geo/transfers/file/#{upload.id}"), nil, Authorization: 'Test'
+        get api("/geo/transfers/file/#{upload.id}"), headers: { Authorization: 'Test' }
 
         expect(response).to have_gitlab_http_status(401)
       end
 
       context 'when the Upload record exists' do
         context 'when the file exists' do
-          subject(:request) { get api("/geo/transfers/file/#{upload.id}"), nil, req_header }
+          subject(:request) { get api("/geo/transfers/file/#{upload.id}"), headers: req_header }
 
           it 'responds with 200 with X-Sendfile' do
             request
@@ -144,7 +144,7 @@
           it 'responds with 404 and a specific geo code' do
             File.unlink(upload.absolute_path)
 
-            get api("/geo/transfers/file/#{upload.id}"), nil, req_header
+            get api("/geo/transfers/file/#{upload.id}"), headers: req_header
 
             expect(response).to have_gitlab_http_status(404)
             expect(json_response['geo_code']).to eq(Gitlab::Geo::FileUploader::FILE_NOT_FOUND_GEO_CODE)
@@ -154,7 +154,7 @@
 
       context 'when the Upload record does not exist' do
         it 'responds with 404' do
-          get api("/geo/transfers/file/100000"), nil, req_header
+          get api("/geo/transfers/file/100000"), headers: req_header
 
           expect(response).to have_gitlab_http_status(404)
         end
@@ -173,14 +173,14 @@
       end
 
       it 'responds with 401 with invalid auth header' do
-        get api("/geo/transfers/lfs/#{lfs_object.id}"), nil, Authorization: 'Test'
+        get api("/geo/transfers/lfs/#{lfs_object.id}"), headers: { Authorization: 'Test' }
 
         expect(response).to have_gitlab_http_status(401)
       end
 
       context 'LFS object exists' do
         context 'file exists' do
-          subject(:request) { get api("/geo/transfers/lfs/#{lfs_object.id}"), nil, req_header }
+          subject(:request) { get api("/geo/transfers/lfs/#{lfs_object.id}"), headers: req_header }
 
           it 'responds with 200 with X-Sendfile' do
             request
@@ -197,7 +197,7 @@
           it 'responds with 404 and a specific geo code' do
             File.unlink(lfs_object.file.path)
 
-            get api("/geo/transfers/lfs/#{lfs_object.id}"), nil, req_header
+            get api("/geo/transfers/lfs/#{lfs_object.id}"), headers: req_header
 
             expect(response).to have_gitlab_http_status(404)
             expect(json_response['geo_code']).to eq(Gitlab::Geo::FileUploader::FILE_NOT_FOUND_GEO_CODE)
@@ -207,7 +207,7 @@
 
       context 'LFS object does not exist' do
         it 'responds with 404' do
-          get api("/geo/transfers/lfs/100000"), nil, req_header
+          get api("/geo/transfers/lfs/100000"), headers: req_header
 
           expect(response).to have_gitlab_http_status(404)
         end
@@ -255,10 +255,10 @@
       }
     end
 
-    subject(:request) { post api('/geo/status'), data, geo_base_request.headers }
+    subject(:request) { post api('/geo/status'), params: data, headers: geo_base_request.headers }
 
     it 'responds with 401 with invalid auth header' do
-      post api('/geo/status'), nil, Authorization: 'Test'
+      post api('/geo/status'), headers: { Authorization: 'Test' }
 
       expect(response).to have_gitlab_http_status(401)
     end
@@ -300,7 +300,7 @@
     describe 'POST /geo/proxy_git_push_ssh/info_refs' do
       context 'with all required params missing' do
         it 'responds with 400' do
-          post api('/geo/proxy_git_push_ssh/info_refs'), nil
+          post api('/geo/proxy_git_push_ssh/info_refs'), params: nil
 
           expect(response).to have_gitlab_http_status(400)
           expect(json_response['error']).to eql('secret_token is missing, data is missing, data[gl_id] is missing, data[primary_repo] is missing')
@@ -316,7 +316,7 @@
 
         context 'with an invalid secret_token' do
           it 'responds with 401' do
-            post(api('/geo/proxy_git_push_ssh/info_refs'), { secret_token: 'invalid', data: data })
+            post(api('/geo/proxy_git_push_ssh/info_refs'), params: { secret_token: 'invalid', data: data })
 
             expect(response).to have_gitlab_http_status(401)
             expect(json_response['error']).to be_nil
@@ -327,7 +327,7 @@
           it 'responds with 500' do
             expect(git_push_ssh_proxy).to receive(:info_refs).and_raise('deliberate exception raised')
 
-            post api('/geo/proxy_git_push_ssh/info_refs'), { secret_token: secret_token, data: data }
+            post api('/geo/proxy_git_push_ssh/info_refs'), params: { secret_token: secret_token, data: data }
 
             expect(response).to have_gitlab_http_status(500)
             expect(json_response['message']).to include('RuntimeError (deliberate exception raised)')
@@ -348,7 +348,7 @@
           it 'responds with 200' do
             expect(git_push_ssh_proxy).to receive(:info_refs).and_return(api_response)
 
-            post api('/geo/proxy_git_push_ssh/info_refs'), { secret_token: secret_token, data: data }
+            post api('/geo/proxy_git_push_ssh/info_refs'), params: { secret_token: secret_token, data: data }
 
             expect(response).to have_gitlab_http_status(200)
             expect(Base64.decode64(json_response['result'])).to eql('something here')
@@ -360,7 +360,7 @@
     describe 'POST /geo/proxy_git_push_ssh/push' do
       context 'with all required params missing' do
         it 'responds with 400' do
-          post api('/geo/proxy_git_push_ssh/push'), nil
+          post api('/geo/proxy_git_push_ssh/push'), params: nil
 
           expect(response).to have_gitlab_http_status(400)
           expect(json_response['error']).to eql('secret_token is missing, data is missing, data[gl_id] is missing, data[primary_repo] is missing, output is missing')
@@ -377,7 +377,7 @@
 
         context 'with an invalid secret_token' do
           it 'responds with 401' do
-            post(api('/geo/proxy_git_push_ssh/push'), { secret_token: 'invalid', data: data, output: output })
+            post(api('/geo/proxy_git_push_ssh/push'), params: { secret_token: 'invalid', data: data, output: output })
 
             expect(response).to have_gitlab_http_status(401)
             expect(json_response['error']).to be_nil
@@ -387,7 +387,7 @@
         context 'where an exception occurs' do
           it 'responds with 500' do
             expect(git_push_ssh_proxy).to receive(:push).and_raise('deliberate exception raised')
-            post api('/geo/proxy_git_push_ssh/push'), { secret_token: secret_token, data: data, output: output }
+            post api('/geo/proxy_git_push_ssh/push'), params: { secret_token: secret_token, data: data, output: output }
 
             expect(response).to have_gitlab_http_status(500)
             expect(json_response['message']).to include('RuntimeError (deliberate exception raised)')
@@ -408,7 +408,7 @@
           it 'responds with 201' do
             expect(git_push_ssh_proxy).to receive(:push).with(output).and_return(api_response)
 
-            post api('/geo/proxy_git_push_ssh/push'), { secret_token: secret_token, data: data, output: output }
+            post api('/geo/proxy_git_push_ssh/push'), params: { secret_token: secret_token, data: data, output: output }
 
             expect(response).to have_gitlab_http_status(201)
             expect(Base64.decode64(json_response['result'])).to eql('something here')
diff --git a/ee/spec/requests/api/groups_spec.rb b/ee/spec/requests/api/groups_spec.rb
index 45d439a5d74722782f97f94677ddabf28b2b54b9..abc24600714ff6341994c6e80c1f418f12dd59ab 100644
--- a/ee/spec/requests/api/groups_spec.rb
+++ b/ee/spec/requests/api/groups_spec.rb
@@ -10,7 +10,7 @@
       group.add_owner(user)
     end
 
-    subject(:do_it) { put api("/groups/#{group.id}", user), file_template_project_id: project.id }
+    subject(:do_it) { put api("/groups/#{group.id}", user), params: { file_template_project_id: project.id } }
 
     it 'does not update file_template_project_id if unlicensed' do
       stub_licensed_features(custom_file_templates_for_namespace: false)
diff --git a/ee/spec/requests/api/issue_links_spec.rb b/ee/spec/requests/api/issue_links_spec.rb
index 6750d483bb22a8c830bf7500e83b9292d91027e4..6f7497b4fc5e8c4ca61dc2ae88662bd2299ba164 100644
--- a/ee/spec/requests/api/issue_links_spec.rb
+++ b/ee/spec/requests/api/issue_links_spec.rb
@@ -39,7 +39,7 @@
         target_issue = create(:issue)
 
         post api("/projects/#{project.id}/issues/#{issue.iid}/links"),
-             target_project_id: target_issue.project.id, target_issue_iid: target_issue.iid
+             params: { target_project_id: target_issue.project.id, target_issue_iid: target_issue.iid }
 
         expect(response).to have_gitlab_http_status(401)
       end
@@ -51,7 +51,7 @@
           target_issue = create(:issue)
 
           post api("/projects/#{project.id}/issues/#{issue.iid}/links", user),
-               target_project_id: 999, target_issue_iid: target_issue.iid
+               params: { target_project_id: 999, target_issue_iid: target_issue.iid }
 
           expect(response).to have_gitlab_http_status(404)
           expect(json_response['message']).to eq('404 Project Not Found')
@@ -63,7 +63,7 @@
           target_project = create(:project, :public)
 
           post api("/projects/#{project.id}/issues/#{issue.iid}/links", user),
-               target_project_id: target_project.id, target_issue_iid: 999
+               params: { target_project_id: target_project.id, target_issue_iid: 999 }
 
           expect(response).to have_gitlab_http_status(404)
           expect(json_response['message']).to eq('404 Not found')
@@ -77,7 +77,7 @@
           unauthorized_project.add_guest(user)
 
           post api("/projects/#{project.id}/issues/#{issue.iid}/links", user),
-               target_project_id: unauthorized_project.id, target_issue_iid: target_issue.iid
+               params: { target_project_id: unauthorized_project.id, target_issue_iid: target_issue.iid }
 
           expect(response).to have_gitlab_http_status(404)
           expect(json_response['message']).to eq('No Issue found for given params')
@@ -90,7 +90,7 @@
           target_issue = create(:issue, :confidential, project: project)
 
           post api("/projects/#{project.id}/issues/#{issue.iid}/links", user),
-               target_project_id: project.id, target_issue_iid: target_issue.iid
+               params: { target_project_id: project.id, target_issue_iid: target_issue.iid }
 
           expect(response).to have_gitlab_http_status(404)
           expect(json_response['message']).to eq('404 Not found')
@@ -103,7 +103,7 @@
           target_issue = create(:issue, project: project)
 
           post api("/projects/#{project.id}/issues/#{issue.iid}/links", user),
-               target_project_id: project.id, target_issue_iid: target_issue.iid
+               params: { target_project_id: project.id, target_issue_iid: target_issue.iid }
 
           expect(response).to have_gitlab_http_status(404)
           expect(json_response['message']).to eq('404 Project Not Found')
@@ -116,7 +116,7 @@
           project.add_reporter(user)
 
           post api("/projects/#{project.id}/issues/#{issue.iid}/links", user),
-               target_project_id: project.id, target_issue_iid: target_issue.iid
+               params: { target_project_id: project.id, target_issue_iid: target_issue.iid }
 
           expect(response).to have_gitlab_http_status(201)
           expect(json_response).to include('source_issue', 'target_issue')
@@ -127,7 +127,7 @@
           project.add_reporter(user)
 
           post api("/projects/#{project.id}/issues/#{issue.iid}/links", user),
-               target_project_id: project.to_reference(full: true), target_issue_iid: target_issue.iid
+               params: { target_project_id: project.to_reference(full: true), target_issue_iid: target_issue.iid }
 
           expect(response).to have_gitlab_http_status(201)
           expect(json_response).to include('source_issue', 'target_issue')
diff --git a/ee/spec/requests/api/issues_spec.rb b/ee/spec/requests/api/issues_spec.rb
index 99e525d360ec159afbc36ff00b31a1add0ccbd90..1758c4e431cc859a0bfde5b26bf0d809e92e3abf 100644
--- a/ee/spec/requests/api/issues_spec.rb
+++ b/ee/spec/requests/api/issues_spec.rb
@@ -46,21 +46,21 @@
         let!(:issue2) { create(:issue, author: user2, project: project, weight: 5) }
 
         it 'returns issues with specific weight' do
-          get api('/issues', user), weight: 5, scope: 'all'
+          get api('/issues', user), params: { weight: 5, scope: 'all' }
 
           expect_paginated_array_response(size: 1)
           expect(json_response.first['id']).to eq(issue2.id)
         end
 
         it 'returns issues with no weight' do
-          get api('/issues', user), weight: 'None', scope: 'all'
+          get api('/issues', user), params: { weight: 'None', scope: 'all' }
 
           expect_paginated_array_response(size: 1)
           expect(json_response.first['id']).to eq(issue.id)
         end
 
         it 'returns issues with any weight' do
-          get api('/issues', user), weight: 'Any', scope: 'all'
+          get api('/issues', user), params: { weight: 'Any', scope: 'all' }
 
           expect_paginated_array_response(size: 3)
         end
@@ -71,8 +71,7 @@
   describe "POST /projects/:id/issues" do
     it 'creates a new project issue' do
       post api("/projects/#{project.id}/issues", user),
-        title: 'new issue', labels: 'label, label2', weight: 101,
-        assignee_ids: [user2.id]
+        params: { title: 'new issue', labels: 'label, label2', weight: 101, assignee_ids: [user2.id] }
 
       expect(response).to have_gitlab_http_status(201)
       expect(json_response['title']).to eq('new issue')
@@ -87,7 +86,7 @@
 
   describe 'PUT /projects/:id/issues/:issue_id to update weight' do
     it 'updates an issue with no weight' do
-      put api("/projects/#{project.id}/issues/#{issue.iid}", user), weight: 101
+      put api("/projects/#{project.id}/issues/#{issue.iid}", user), params: { weight: 101 }
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['weight']).to eq(101)
@@ -96,14 +95,14 @@
     it 'removes a weight from an issue' do
       weighted_issue = create(:issue, project: project, weight: 2)
 
-      put api("/projects/#{project.id}/issues/#{weighted_issue.iid}", user), weight: nil
+      put api("/projects/#{project.id}/issues/#{weighted_issue.iid}", user), params: { weight: nil }
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['weight']).to be_nil
     end
 
     it 'returns 400 if weight is less than minimum weight' do
-      put api("/projects/#{project.id}/issues/#{issue.iid}", user), weight: -1
+      put api("/projects/#{project.id}/issues/#{issue.iid}", user), params: { weight: -1 }
 
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['message']['weight']).to be_present
@@ -111,7 +110,7 @@
 
     it 'adds a note when the weight is changed' do
       expect do
-        put api("/projects/#{project.id}/issues/#{issue.iid}", user), weight: 9
+        put api("/projects/#{project.id}/issues/#{issue.iid}", user), params: { weight: 9 }
       end.to change { Note.count }.by(1)
 
       expect(response).to have_gitlab_http_status(200)
@@ -124,7 +123,7 @@
       end
 
       it 'ignores the update' do
-        put api("/projects/#{project.id}/issues/#{issue.iid}", user), weight: 5
+        put api("/projects/#{project.id}/issues/#{issue.iid}", user), params: { weight: 5 }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['weight']).to be_nil
diff --git a/ee/spec/requests/api/jobs_spec.rb b/ee/spec/requests/api/jobs_spec.rb
index 2f2186b55536fe85b08b7144734f08d0f34c5a66..954e8c3bfc61791b7514fc1c1e16a368e185c20b 100644
--- a/ee/spec/requests/api/jobs_spec.rb
+++ b/ee/spec/requests/api/jobs_spec.rb
@@ -41,7 +41,7 @@
       let(:job) { create(:ci_build, :artifacts, pipeline: pipeline, user: api_user) }
 
       before do
-        get api("/projects/#{project.id}/jobs/#{job.id}/artifacts"), job_token: job.token
+        get api("/projects/#{project.id}/jobs/#{job.id}/artifacts"), params: { job_token: job.token }
       end
 
       context 'user is developer' do
diff --git a/ee/spec/requests/api/ldap_group_links_spec.rb b/ee/spec/requests/api/ldap_group_links_spec.rb
index 108043eb3dd340d4d336421c33146abf55f1f9b6..fea6a8c9323d57b601f0f9b1041da9889c84c112 100644
--- a/ee/spec/requests/api/ldap_group_links_spec.rb
+++ b/ee/spec/requests/api/ldap_group_links_spec.rb
@@ -31,7 +31,7 @@
       it "does not allow less priviledged user to add LDAP group link" do
         expect do
           post api("/groups/#{group_with_ldap_links.id}/ldap_group_links", user),
-          cn: 'ldap-group4', group_access: GroupMember::GUEST, provider: 'ldap3'
+          params: { cn: 'ldap-group4', group_access: GroupMember::GUEST, provider: 'ldap3' }
         end.not_to change { group_with_ldap_links.ldap_group_links.count }
 
         expect(response.status).to eq(403)
@@ -42,7 +42,7 @@
       it "returns ok and add ldap group link" do
         expect do
           post api("/groups/#{group_with_ldap_links.id}/ldap_group_links", owner),
-          cn: 'ldap-group3', group_access: GroupMember::GUEST, provider: 'ldap3'
+          params: { cn: 'ldap-group3', group_access: GroupMember::GUEST, provider: 'ldap3' }
         end.to change { group_with_ldap_links.ldap_group_links.count }.by(1)
 
         expect(response.status).to eq(201)
@@ -55,7 +55,7 @@
       xit "returns ok and add ldap group link even if no provider specified" do
         expect do
           post api("/groups/#{group_with_ldap_links.id}/ldap_group_links", owner),
-          cn: 'ldap-group3', group_access: GroupMember::GUEST
+          params: { cn: 'ldap-group3', group_access: GroupMember::GUEST }
         end.to change { group_with_ldap_links.ldap_group_links.count }.by(1)
 
         expect(response.status).to eq(201)
@@ -65,22 +65,22 @@
       end
 
       it "returns error if LDAP group link already exists" do
-        post api("//groups/#{group_with_ldap_links.id}/ldap_group_links", owner), provider: 'ldap1', cn: 'ldap-group1', group_access: GroupMember::GUEST
+        post api("//groups/#{group_with_ldap_links.id}/ldap_group_links", owner), params: { provider: 'ldap1', cn: 'ldap-group1', group_access: GroupMember::GUEST }
         expect(response.status).to eq(409)
       end
 
       it "returns a 400 error when cn is not given" do
-        post api("//groups/#{group_with_ldap_links.id}/ldap_group_links", owner), group_access: GroupMember::GUEST
+        post api("//groups/#{group_with_ldap_links.id}/ldap_group_links", owner), params: { group_access: GroupMember::GUEST }
         expect(response.status).to eq(400)
       end
 
       it "returns a 400 error when group access is not given" do
-        post api("//groups/#{group_with_ldap_links.id}/ldap_group_links", owner), cn: 'ldap-group3'
+        post api("//groups/#{group_with_ldap_links.id}/ldap_group_links", owner), params: { cn: 'ldap-group3' }
         expect(response.status).to eq(400)
       end
 
       it "returns a 422 error when group access is not known" do
-        post api("//groups/#{group_with_ldap_links.id}/ldap_group_links", owner), cn: 'ldap-group3', group_access: 11, provider: 'ldap1'
+        post api("//groups/#{group_with_ldap_links.id}/ldap_group_links", owner), params: { cn: 'ldap-group3', group_access: 11, provider: 'ldap1' }
 
         expect(response.status).to eq(400)
         expect(json_response['error']).to eq('group_access does not have a valid value')
diff --git a/ee/spec/requests/api/license_spec.rb b/ee/spec/requests/api/license_spec.rb
index 0afa9bca4cf35c06350d9676b849d78457b3eae9..e0ad491e14997febae707f545098eac4dfb5cb86 100644
--- a/ee/spec/requests/api/license_spec.rb
+++ b/ee/spec/requests/api/license_spec.rb
@@ -28,7 +28,7 @@
 
   describe 'POST /license' do
     it 'adds a new license if admin is logged in' do
-      post api('/license', admin), license: gl_license.export
+      post api('/license', admin), params: { license: gl_license.export }
 
       expect(response.status).to eq 201
       expect(json_response['user_limit']).to eq 0
@@ -39,13 +39,13 @@
     end
 
     it 'denies access if not admin' do
-      post api('/license', user), license: license
+      post api('/license', user), params: { license: license }
 
       expect(response.status).to eq 403
     end
 
     it 'returns 400 if the license cannot be saved' do
-      post api('/license', admin), license: 'foo'
+      post api('/license', admin), params: { license: 'foo' }
 
       expect(response.status).to eq(400)
     end
diff --git a/ee/spec/requests/api/managed_licenses_spec.rb b/ee/spec/requests/api/managed_licenses_spec.rb
index d38632ee32c9c99a977bc2b046729e34af94d761..4e48e8e2236c07e602b6ef13f531f43b265e87c1 100644
--- a/ee/spec/requests/api/managed_licenses_spec.rb
+++ b/ee/spec/requests/api/managed_licenses_spec.rb
@@ -134,8 +134,10 @@
       it 'creates managed license' do
         expect do
           post api("/projects/#{project.id}/managed_licenses", maintainer_user),
-            name: 'NEW_LICENSE_NAME',
-            approval_status: 'approved'
+            params: {
+              name: 'NEW_LICENSE_NAME',
+              approval_status: 'approved'
+            }
         end.to change {project.software_license_policies.count}.by(1)
 
         expect(response).to have_gitlab_http_status(201)
@@ -147,8 +149,10 @@
       it 'does not allow to duplicate managed license name' do
         expect do
           post api("/projects/#{project.id}/managed_licenses", maintainer_user),
-            name: software_license_policy.name,
-            approval_status: 'blacklisted'
+            params: {
+              name: software_license_policy.name,
+              approval_status: 'blacklisted'
+            }
         end.not_to change {project.software_license_policies.count}
 
         expect(response).to have_gitlab_http_status(400)
@@ -158,8 +162,10 @@
     context 'authorized user with read permissions' do
       it 'does not create managed license' do
         post api("/projects/#{project.id}/managed_licenses", dev_user),
-          name: 'NEW_LICENSE_NAME',
-          approval_status: 'approved'
+          params: {
+            name: 'NEW_LICENSE_NAME',
+            approval_status: 'approved'
+          }
 
         expect(response).to have_gitlab_http_status(403)
       end
@@ -168,8 +174,10 @@
     context 'authorized user without permissions' do
       it 'does not create managed license' do
         post api("/projects/#{project.id}/managed_licenses", reporter_user),
-          name: 'NEW_LICENSE_NAME',
-          approval_status: 'approved'
+          params: {
+            name: 'NEW_LICENSE_NAME',
+            approval_status: 'approved'
+          }
 
         expect(response).to have_gitlab_http_status(403)
       end
@@ -178,8 +186,10 @@
     context 'unauthorized user' do
       it 'does not create managed license' do
         post api("/projects/#{project.id}/managed_licenses"),
-          name: 'NEW_LICENSE_NAME',
-          approval_status: 'approved'
+          params: {
+            name: 'NEW_LICENSE_NAME',
+            approval_status: 'approved'
+          }
 
         expect(response).to have_gitlab_http_status(401)
       end
@@ -194,7 +204,7 @@
         initial_name = initial_license.name
         initial_approval_status = initial_license.approval_status
         patch api("/projects/#{project.id}/managed_licenses/#{software_license_policy.id}", maintainer_user),
-          approval_status: 'blacklisted'
+          params: { approval_status: 'blacklisted' }
 
         updated_software_license_policy = project.software_license_policies.reload.first
 
diff --git a/ee/spec/requests/api/maven_packages_spec.rb b/ee/spec/requests/api/maven_packages_spec.rb
index 477b0e95a95a7a688809376bf9c8af6f7088d71e..d2b2df4436efb4275de379591d6d80830baa9627 100644
--- a/ee/spec/requests/api/maven_packages_spec.rb
+++ b/ee/spec/requests/api/maven_packages_spec.rb
@@ -118,7 +118,7 @@
     end
 
     def download_file(file_name, params = {}, request_headers = headers)
-      get api("/packages/maven/#{maven_metadatum.path}/#{file_name}"), params, request_headers
+      get api("/packages/maven/#{maven_metadatum.path}/#{file_name}"), params: params, headers: request_headers
     end
 
     def download_file_with_token(file_name, params = {}, request_headers = headers_with_token)
@@ -223,7 +223,7 @@ def download_file_with_token(file_name, params = {}, request_headers = headers_w
     end
 
     def download_file(file_name, params = {}, request_headers = headers)
-      get api("/groups/#{group.id}/-/packages/maven/#{maven_metadatum.path}/#{file_name}"), params, request_headers
+      get api("/groups/#{group.id}/-/packages/maven/#{maven_metadatum.path}/#{file_name}"), params: params, headers: request_headers
     end
 
     def download_file_with_token(file_name, params = {}, request_headers = headers_with_token)
@@ -297,7 +297,7 @@ def download_file_with_token(file_name, params = {}, request_headers = headers_w
 
     def download_file(file_name, params = {}, request_headers = headers)
       get api("/projects/#{project.id}/packages/maven/" \
-              "#{maven_metadatum.path}/#{file_name}"), params, request_headers
+              "#{maven_metadatum.path}/#{file_name}"), params: params, headers: request_headers
     end
 
     def download_file_with_token(file_name, params = {}, request_headers = headers_with_token)
@@ -345,7 +345,7 @@ def download_file_with_token(file_name, params = {}, request_headers = headers_w
     end
 
     def authorize_upload(params = {}, request_headers = headers)
-      put api("/projects/#{project.id}/packages/maven/com/example/my-app/1.0-SNAPSHOT/maven-metadata.xml/authorize"), params, request_headers
+      put api("/projects/#{project.id}/packages/maven/com/example/my-app/1.0-SNAPSHOT/maven-metadata.xml/authorize"), params: params, headers: request_headers
     end
 
     def authorize_upload_with_token(params = {}, request_headers = headers_with_token)
@@ -408,7 +408,7 @@ def authorize_upload_with_token(params = {}, request_headers = headers_with_toke
     end
 
     def upload_file(params = {}, request_headers = headers)
-      put api("/projects/#{project.id}/packages/maven/com/example/my-app/1.0-SNAPSHOT/maven-metadata.xml"), params, request_headers
+      put api("/projects/#{project.id}/packages/maven/com/example/my-app/1.0-SNAPSHOT/maven-metadata.xml"), params: params, headers: request_headers
     end
 
     def upload_file_with_token(params = {}, request_headers = headers_with_token)
diff --git a/ee/spec/requests/api/merge_request_approvals_spec.rb b/ee/spec/requests/api/merge_request_approvals_spec.rb
index aafd385ba00a1a8d49cfc8a91822ad4ab43d70cd..c1b3521bd226a212db08adde0a498ffe5b7e829e 100644
--- a/ee/spec/requests/api/merge_request_approvals_spec.rb
+++ b/ee/spec/requests/api/merge_request_approvals_spec.rb
@@ -81,7 +81,7 @@
 
         it 'allows you to override approvals required' do
           expect do
-            post api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/approvals", current_user), approvals_required: 5
+            post api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/approvals", current_user), params: { approvals_required: 5 }
           end.to change { merge_request.reload.approvals_before_merge }.from(nil).to(5)
 
           expect(response).to have_gitlab_http_status(201)
@@ -95,7 +95,7 @@
 
           it 'does not include an error in the response' do
             expect do
-              post api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/approvals", current_user), approvals_required: 0
+              post api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/approvals", current_user), params: { approvals_required: 0 }
             end.to change {merge_request.reload.approvals_before_merge}.from(nil).to(0)
             expect(json_response['message']).to eq(nil)
           end
@@ -103,7 +103,7 @@
 
         it 'does not allow approvals required under what the project requires' do
           expect do
-            post api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/approvals", current_user), approvals_required: 1
+            post api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/approvals", current_user), params: { approvals_required: 1 }
           end.not_to change { merge_request.reload.approvals_before_merge }
 
           expect(response).to have_gitlab_http_status(400)
@@ -117,7 +117,7 @@
 
         it 'does not allow you to override approvals required' do
           expect do
-            post api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/approvals", current_user), approvals_required: 5
+            post api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/approvals", current_user), params: { approvals_required: 5 }
           end.not_to change { merge_request.reload.approvals_before_merge }
 
           expect(response).to have_gitlab_http_status(422)
@@ -128,7 +128,7 @@
         private_group = create(:group, :private)
         merge_request.approver_groups.create(group: private_group)
 
-        post api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/approvals", current_user), approvals_required: 5
+        post api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/approvals", current_user), params: { approvals_required: 5 }
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['approver_groups'].size).to eq(approver_groups_count)
@@ -156,7 +156,7 @@
 
       it 'does not allow you to override approvals required' do
         expect do
-          post api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/approvals", user2), approvals_required: 5
+          post api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/approvals", user2), params: { approvals_required: 5 }
         end.not_to change { merge_request.reload.approvals_before_merge }
 
         expect(response).to have_gitlab_http_status(403)
@@ -179,7 +179,7 @@
         it 'does not allow overriding approvers' do
           expect do
             put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/approvers", current_user),
-              approver_ids: [approver.id], approver_group_ids: [approver_group.id]
+              params: { approver_ids: [approver.id], approver_group_ids: [approver_group.id] }
           end.to not_change { merge_request.approvers.count }.and not_change { merge_request.approver_groups.count }
         end
       end
@@ -192,7 +192,7 @@
         it 'allows overriding approvers' do
           expect do
             put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/approvers", current_user),
-              approver_ids: [approver.id], approver_group_ids: [approver_group.id]
+              params: { approver_ids: [approver.id], approver_group_ids: [approver_group.id] }
           end.to change { merge_request.approvers.count }.from(0).to(1)
              .and change { merge_request.approver_groups.count }.from(0).to(1)
 
@@ -207,7 +207,7 @@
 
           expect do
             put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/approvers", current_user),
-              { approver_ids: [], approver_group_ids: [] }.to_json, { CONTENT_TYPE: 'application/json' }
+              params: { approver_ids: [], approver_group_ids: [] }.to_json, headers: { CONTENT_TYPE: 'application/json' }
           end.to change { merge_request.approvers.count }.from(1).to(0)
              .and change { merge_request.approver_groups.count }.from(1).to(0)
 
@@ -222,7 +222,7 @@
 
             expect do
               put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/approvers", current_user),
-                approver_ids: '', approver_group_ids: ''
+                params: { approver_ids: '', approver_group_ids: '' }
             end.to change { merge_request.approvers.count }.from(1).to(0)
               .and change { merge_request.approver_groups.count }.from(1).to(0)
 
@@ -237,7 +237,7 @@
         merge_request.approver_groups.create(group: private_group)
 
         put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/approvers", current_user),
-          approver_ids: [approver.id], approver_group_ids: [private_group.id, approver_group.id]
+          params: { approver_ids: [approver.id], approver_group_ids: [private_group.id, approver_group.id] }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['approver_groups'].size).to eq(approver_groups_count)
@@ -266,7 +266,7 @@
       it 'does not allow overriding approvers' do
         expect do
           put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/approvers", user2),
-            approver_ids: [approver.id], approver_group_ids: [approver_group.id]
+            params: { approver_ids: [approver.id], approver_group_ids: [approver_group.id] }
         end.to not_change { merge_request.approvers.count }.and not_change { merge_request.approver_groups.count }
 
         expect(response).to have_gitlab_http_status(403)
@@ -294,7 +294,7 @@
       end
 
       def approve(extra_params = {})
-        post api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/approve", approver), extra_params
+        post api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/approve", approver), params: extra_params
       end
 
       context 'when the sha param is not set' do
diff --git a/ee/spec/requests/api/merge_requests_spec.rb b/ee/spec/requests/api/merge_requests_spec.rb
index be3eba8235e4853d8bab4c3e93e4fb81b7fbbcd2..37dd1502dcba0beb8ccf2d518592880c89947677 100644
--- a/ee/spec/requests/api/merge_requests_spec.rb
+++ b/ee/spec/requests/api/merge_requests_spec.rb
@@ -29,7 +29,7 @@ def create_merge_request(args)
           milestone_id: milestone.id
       }
       defaults = defaults.merge(args)
-      post api("/projects/#{project.id}/merge_requests", user), defaults
+      post api("/projects/#{project.id}/merge_requests", user), params: defaults
     end
     context 'between branches projects' do
       it "returns merge_request" do
diff --git a/ee/spec/requests/api/namespaces_spec.rb b/ee/spec/requests/api/namespaces_spec.rb
index c450ad9d3be207502f8409c77e165f03c569072a..a655bf4852b4d746d8e8e24dfabe563af7ddf5bb 100644
--- a/ee/spec/requests/api/namespaces_spec.rb
+++ b/ee/spec/requests/api/namespaces_spec.rb
@@ -113,7 +113,7 @@
 
     context 'when authenticated as admin' do
       it 'updates namespace using full_path' do
-        put api("/namespaces/#{group1.full_path}", admin), plan: 'silver', shared_runners_minutes_limit: 9001
+        put api("/namespaces/#{group1.full_path}", admin), params: { plan: 'silver', shared_runners_minutes_limit: 9001 }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['plan']).to eq('silver')
@@ -121,7 +121,7 @@
       end
 
       it 'updates namespace using id' do
-        put api("/namespaces/#{group1.id}", admin), plan: 'silver', shared_runners_minutes_limit: 9001
+        put api("/namespaces/#{group1.id}", admin), params: { plan: 'silver', shared_runners_minutes_limit: 9001 }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['plan']).to eq('silver')
@@ -131,7 +131,7 @@
 
     context 'when not authenticated as admin' do
       it 'retuns 403' do
-        put api("/namespaces/#{group1.id}", user), plan: 'silver'
+        put api("/namespaces/#{group1.id}", user), params: { plan: 'silver' }
 
         expect(response).to have_gitlab_http_status(403)
       end
@@ -139,7 +139,7 @@
 
     context 'when namespace not found' do
       it 'returns 404' do
-        put api("/namespaces/12345", admin), plan: 'silver'
+        put api("/namespaces/12345", admin), params: { plan: 'silver' }
 
         expect(response).to have_gitlab_http_status(404)
         expect(json_response).to eq('message' => '404 Namespace Not Found')
@@ -148,7 +148,7 @@
 
     context 'when invalid params' do
       it 'returns validation error' do
-        put api("/namespaces/#{group1.id}", admin), plan: 'unknown'
+        put api("/namespaces/#{group1.id}", admin), params: { plan: 'unknown' }
 
         expect(response).to have_gitlab_http_status(400)
         expect(json_response['message']).to eq('plan' => ['is not included in the list'])
@@ -165,7 +165,7 @@
     end
 
     def do_post(current_user, payload)
-      post api("/namespaces/#{group1.id}/gitlab_subscription", current_user), payload
+      post api("/namespaces/#{group1.id}/gitlab_subscription", current_user), params: payload
     end
 
     context 'when authenticated as a regular user' do
@@ -239,7 +239,7 @@ def do_get(current_user)
 
   describe 'PUT :id/gitlab_subscription' do
     def do_put(namespace_id, current_user, payload)
-      put api("/namespaces/#{namespace_id}/gitlab_subscription", current_user), payload
+      put api("/namespaces/#{namespace_id}/gitlab_subscription", current_user), params: payload
     end
 
     set(:namespace) { create(:group) }
diff --git a/ee/spec/requests/api/project_approvals_spec.rb b/ee/spec/requests/api/project_approvals_spec.rb
index b0d9c7a3653a749d55acbfa68a194be6122c76a8..68d31401ba3838f360d8e05e116c493bb54eb5ea 100644
--- a/ee/spec/requests/api/project_approvals_spec.rb
+++ b/ee/spec/requests/api/project_approvals_spec.rb
@@ -51,13 +51,13 @@
 
       context 'when the request is correct' do
         it 'returns 201 status' do
-          post api(url, current_user), approvals_before_merge: 3
+          post api(url, current_user), params: { approvals_before_merge: 3 }
 
           expect(response).to have_gitlab_http_status(201)
         end
 
         it 'matches the response schema' do
-          post api(url, current_user), approvals_before_merge: 3
+          post api(url, current_user), params: { approvals_before_merge: 3 }
 
           expect(response).to match_response_schema('public_api/v4/project_approvers', dir: 'ee')
         end
@@ -74,7 +74,7 @@
             disable_overriding_approvers_per_merge_request: false
           }
 
-          post api(url, current_user), settings
+          post api(url, current_user), params: settings
 
           expect(JSON.parse(response.body).symbolize_keys).to include(settings)
         end
@@ -83,7 +83,7 @@
           private_group = create(:group, :private)
           project.approver_groups.create(group: private_group)
 
-          post api(url, current_user), approvals_before_merge: 3
+          post api(url, current_user), params: { approvals_before_merge: 3 }
 
           expect(response).to match_response_schema('public_api/v4/project_approvers', dir: 'ee')
           expect(json_response["approver_groups"].size).to eq(visible_approver_groups_count)
@@ -107,7 +107,7 @@
 
     context 'as a user without access' do
       it 'returns 403' do
-        post api(url, user2), approvals_before_merge: 4
+        post api(url, user2), params: { approvals_before_merge: 4 }
 
         expect(response).to have_gitlab_http_status(403)
       end
@@ -122,7 +122,7 @@
         project.approvers.create(user: approver)
 
         expect do
-          put api(url, current_user), { approver_ids: [], approver_group_ids: [] }.to_json, { CONTENT_TYPE: 'application/json' }
+          put api(url, current_user), params: { approver_ids: [], approver_group_ids: [] }.to_json, headers: { CONTENT_TYPE: 'application/json' }
         end.to change { project.approvers.count }.from(1).to(0)
 
         expect(response).to have_gitlab_http_status(200)
@@ -135,7 +135,7 @@
           project.approvers.create(user: approver)
 
           expect do
-            put api(url, current_user), approver_ids: '', approver_group_ids: ''
+            put api(url, current_user), params: { approver_ids: '', approver_group_ids: '' }
           end.to change { project.approvers.count }.from(1).to(0)
 
           expect(response).to have_gitlab_http_status(200)
@@ -148,7 +148,7 @@
         project.approvers.create(user: approver)
 
         expect do
-          put api(url, current_user), approver_ids: [approver.id], approver_group_ids: [group.id]
+          put api(url, current_user), params: { approver_ids: [approver.id], approver_group_ids: [group.id] }
         end.to change { project.approvers.count }.by(0).and change { project.approver_groups.count }.from(0).to(1)
 
         expect(project.approvers.count).to eq(1)
@@ -165,7 +165,7 @@
         project.approvers.create(user: approver)
 
         expect do
-          put api(url, current_user), approver_ids: [approver.id], approver_group_ids: [private_group.id]
+          put api(url, current_user), params: { approver_ids: [approver.id], approver_group_ids: [private_group.id] }
         end.to change { project.approver_groups.count }.from(0).to(1)
 
         expect(response).to match_response_schema('public_api/v4/project_approvers', dir: 'ee')
@@ -192,7 +192,7 @@
         project.approvers.create(user: approver)
 
         expect do
-          put api(url, user2), { approver_ids: [], approver_group_ids: [] }.to_json, { CONTENT_TYPE: 'application/json' }
+          put api(url, user2), params: { approver_ids: [], approver_group_ids: [] }.to_json, headers: { CONTENT_TYPE: 'application/json' }
         end.not_to change { project.approvers.count }
 
         expect(response).to have_gitlab_http_status(403)
diff --git a/ee/spec/requests/api/project_import_spec.rb b/ee/spec/requests/api/project_import_spec.rb
index 441b2a735273899e11fce0f820593585f7f650ea..ca2e6d8cdaf312d1a525fb9f3ac7ac98f8757c8e 100644
--- a/ee/spec/requests/api/project_import_spec.rb
+++ b/ee/spec/requests/api/project_import_spec.rb
@@ -24,10 +24,12 @@
 
       Sidekiq::Testing.inline! do
         post api('/projects/import', user),
-             path: 'test-import',
-             file: fixture_file_upload(file),
-             namespace: namespace.id,
-             override_params: override_params
+             params: {
+               path: 'test-import',
+               file: fixture_file_upload(file),
+               namespace: namespace.id,
+               override_params: override_params
+             }
       end
       import_project = Project.find(json_response['id'])
 
diff --git a/ee/spec/requests/api/project_mirror_spec.rb b/ee/spec/requests/api/project_mirror_spec.rb
index 72129f25dc54fbe892b25e5d33ffd089bf426c59..4ed11409c8976f23a7a122becf0439ea0b692a8d 100644
--- a/ee/spec/requests/api/project_mirror_spec.rb
+++ b/ee/spec/requests/api/project_mirror_spec.rb
@@ -151,7 +151,7 @@ def project_member(role, user)
         let(:project_mirrored) { create(:project, :repository, :mirror, :import_finished, visibility: visibility) }
 
         def do_post
-          post api("/projects/#{project_mirrored.id}/mirror/pull"), {}, { 'X-Hub-Signature' => 'signature' }
+          post api("/projects/#{project_mirrored.id}/mirror/pull"), params: {}, headers: { 'X-Hub-Signature' => 'signature' }
         end
 
         context "when it's valid" do
@@ -184,7 +184,7 @@ def do_post
           it "doesn't sync the mirror" do
             expect(project_mirrored.import_state).not_to receive(:force_import_job!)
 
-            post api("/projects/#{project_mirrored.id}/mirror/pull"), {}, { 'X-Hub-Signature' => 'signature' }
+            post api("/projects/#{project_mirrored.id}/mirror/pull"), params: {}, headers: { 'X-Hub-Signature' => 'signature' }
           end
 
           context 'with a public project' do
diff --git a/ee/spec/requests/api/project_push_rule_spec.rb b/ee/spec/requests/api/project_push_rule_spec.rb
index 729ca543bbe565784c286b7ec16f25e0fbce88f6..489753ff7dd32d37d235d05372174f830f7ecb8a 100644
--- a/ee/spec/requests/api/project_push_rule_spec.rb
+++ b/ee/spec/requests/api/project_push_rule_spec.rb
@@ -39,12 +39,7 @@
     context "authorized user" do
       it "adds push rule to project" do
         post api("/projects/#{project.id}/push_rule", user),
-          deny_delete_tag: true,  member_check: true, prevent_secrets: true,
-          commit_message_regex: 'JIRA\-\d+',
-          branch_name_regex: '(feature|hotfix)\/*',
-          author_email_regex: '[a-zA-Z0-9]+@gitlab.com',
-          file_name_regex: '[a-zA-Z0-9]+.key',
-          max_file_size: 5
+          params: { deny_delete_tag: true, member_check: true, prevent_secrets: true, commit_message_regex: 'JIRA\-\d+', branch_name_regex: '(feature|hotfix)\/*', author_email_regex: '[a-zA-Z0-9]+@gitlab.com', file_name_regex: '[a-zA-Z0-9]+.key', max_file_size: 5 }
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['project_id']).to eq(project.id)
@@ -61,7 +56,7 @@
 
     it 'adds push rule to project with no file size' do
       post api("/projects/#{project.id}/push_rule", user),
-        commit_message_regex: 'JIRA\-\d+'
+        params: { commit_message_regex: 'JIRA\-\d+' }
 
       expect(response).to have_gitlab_http_status(201)
       expect(json_response['project_id']).to eq(project.id)
@@ -77,7 +72,7 @@
 
     context "unauthorized user" do
       it "does not add push rule to project" do
-        post api("/projects/#{project.id}/push_rule", user3), deny_delete_tag: true
+        post api("/projects/#{project.id}/push_rule", user3), params: { deny_delete_tag: true }
 
         expect(response).to have_gitlab_http_status(403)
       end
@@ -91,7 +86,7 @@
 
     context "with existing push rule" do
       it "does not add push rule to project" do
-        post api("/projects/#{project.id}/push_rule", user), deny_delete_tag: true
+        post api("/projects/#{project.id}/push_rule", user), params: { deny_delete_tag: true }
 
         expect(response).to have_gitlab_http_status(422)
       end
@@ -105,7 +100,7 @@
 
     it "updates an existing project push rule" do
       put api("/projects/#{project.id}/push_rule", user),
-        deny_delete_tag: false, commit_message_regex: 'Fixes \d+\..*'
+        params: { deny_delete_tag: false, commit_message_regex: 'Fixes \d+\..*' }
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['deny_delete_tag']).to eq(false)
@@ -122,13 +117,13 @@
   describe "PUT /projects/:id/push_rule" do
     it "gets error on non existing project push rule" do
       put api("/projects/#{project.id}/push_rule", user),
-        deny_delete_tag: false, commit_message_regex: 'Fixes \d+\..*'
+        params: { deny_delete_tag: false, commit_message_regex: 'Fixes \d+\..*' }
 
       expect(response).to have_gitlab_http_status(404)
     end
 
     it "does not update push rule for unauthorized user" do
-      post api("/projects/#{project.id}/push_rule", user3), deny_delete_tag: true
+      post api("/projects/#{project.id}/push_rule", user3), params: { deny_delete_tag: true }
 
       expect(response).to have_gitlab_http_status(403)
     end
diff --git a/ee/spec/requests/api/project_snapshots_spec.rb b/ee/spec/requests/api/project_snapshots_spec.rb
index c551cb7400a3f1a2dc39c8842f63699f9c76e76f..aa018312978d2c580aa172f3e35722daf5b07a96 100644
--- a/ee/spec/requests/api/project_snapshots_spec.rb
+++ b/ee/spec/requests/api/project_snapshots_spec.rb
@@ -17,7 +17,7 @@
       req = Gitlab::Geo::BaseRequest.new
       allow(req).to receive(:requesting_node) { secondary }
 
-      get api("/projects/#{project.id}/snapshot", nil), {}, req.headers
+      get api("/projects/#{project.id}/snapshot", nil), params: {}, headers: req.headers
 
       expect(response).to have_gitlab_http_status(200)
     end
diff --git a/ee/spec/requests/api/projects_spec.rb b/ee/spec/requests/api/projects_spec.rb
index f34bbf83be7826e2f69141a9bdcb9d0c594ef1f9..55271709f0a6e41083a600425e17be5bdc24f700 100644
--- a/ee/spec/requests/api/projects_spec.rb
+++ b/ee/spec/requests/api/projects_spec.rb
@@ -33,7 +33,7 @@
       end
 
       it 'creates new project with pull mirroring set up' do
-        post api('/projects', user), mirror_params
+        post api('/projects', user), params: mirror_params
 
         expect(response).to have_gitlab_http_status(201)
         expect(Project.first).to have_attributes(
@@ -47,7 +47,7 @@
       it 'creates project without mirror settings when repository mirroring feature is disabled' do
         stub_licensed_features(repository_mirrors: false)
 
-        expect { post api('/projects', user), mirror_params }
+        expect { post api('/projects', user), params: mirror_params }
           .to change { Project.count }.by(1)
 
         expect(response).to have_gitlab_http_status(201)
@@ -65,7 +65,7 @@
         end
 
         it 'ignores the mirroring options' do
-          post api('/projects', user), mirror_params
+          post api('/projects', user), params: mirror_params
 
           expect(response).to have_gitlab_http_status(201)
           expect(Project.first.mirror?).to be false
@@ -74,7 +74,7 @@
         it 'creates project with mirror settings' do
           admin = create(:admin)
 
-          post api('/projects', admin), mirror_params
+          post api('/projects', admin), params: mirror_params
 
           expect(response).to have_gitlab_http_status(201)
           expect(Project.first).to have_attributes(
@@ -97,7 +97,7 @@
       end
 
       it 'updates the classification label' do
-        put(api("/projects/#{project.id}", user), external_authorization_classification_label: 'new label')
+        put(api("/projects/#{project.id}", user), params: { external_authorization_classification_label: 'new label' })
 
         expect(response).to have_gitlab_http_status(200)
 
@@ -113,7 +113,7 @@
         it 'returns 200 but does not change repository_storage' do
           expect do
             Sidekiq::Testing.fake! do
-              put(api("/projects/#{new_project.id}", user), repository_storage: unknown_storage, issues_enabled: false)
+              put(api("/projects/#{new_project.id}", user), params: { repository_storage: unknown_storage, issues_enabled: false })
             end
           end.not_to change(ProjectUpdateRepositoryStorageWorker.jobs, :size)
 
@@ -127,7 +127,7 @@
         let(:admin) { create(:admin) }
 
         it 'returns 500 when repository storage is unknown' do
-          put(api("/projects/#{new_project.id}", admin), repository_storage: unknown_storage)
+          put(api("/projects/#{new_project.id}", admin), params: { repository_storage: unknown_storage })
 
           expect(response).to have_gitlab_http_status(500)
           expect(json_response['message']).to match('ArgumentError')
@@ -138,7 +138,7 @@
 
           expect do
             Sidekiq::Testing.fake! do
-              put(api("/projects/#{new_project.id}", admin), repository_storage: 'extra')
+              put(api("/projects/#{new_project.id}", admin), params: { repository_storage: 'extra' })
             end
           end.to change(ProjectUpdateRepositoryStorageWorker.jobs, :size).by(1)
 
@@ -166,7 +166,7 @@
         end
 
         it 'does not update mirror related attributes' do
-          put(api("/projects/#{project.id}", user), mirror_params)
+          put(api("/projects/#{project.id}", user), params: mirror_params)
 
           expect(response).to have_gitlab_http_status(200)
           expect(project.reload.mirror).to be false
@@ -179,7 +179,7 @@
 
           expect_any_instance_of(EE::ProjectImportState).to receive(:force_import_job!).once
 
-          put(api("/projects/#{project.id}", admin), mirror_params)
+          put(api("/projects/#{project.id}", admin), params: mirror_params)
 
           expect(response).to have_gitlab_http_status(200)
           expect(project.reload).to have_attributes(
@@ -196,7 +196,7 @@
       it 'updates mirror related attributes' do
         expect_any_instance_of(EE::ProjectImportState).to receive(:force_import_job!).once
 
-        put(api("/projects/#{project.id}", user), mirror_params)
+        put(api("/projects/#{project.id}", user), params: mirror_params)
 
         expect(response).to have_gitlab_http_status(200)
         expect(project.reload).to have_attributes(
@@ -212,7 +212,7 @@
       it 'updates project without mirror attributes when the project is unable to set up repository mirroring' do
         stub_licensed_features(repository_mirrors: false)
 
-        put(api("/projects/#{project.id}", user), mirror_params)
+        put(api("/projects/#{project.id}", user), params: mirror_params)
 
         expect(response).to have_gitlab_http_status(200)
         expect(project.reload.mirror).to be false
@@ -223,7 +223,7 @@
         project.add_developer(invalid_mirror_user)
         mirror_params[:mirror_user_id] = invalid_mirror_user.id
 
-        put(api("/projects/#{project.id}", user), mirror_params)
+        put(api("/projects/#{project.id}", user), params: mirror_params)
 
         expect(response).to have_gitlab_http_status(400)
         expect(json_response["message"]["mirror_user_id"].first).to eq("is invalid")
@@ -233,7 +233,7 @@
         developer = create(:user)
         project.add_developer(developer)
 
-        put(api("/projects/#{project.id}", developer), mirror_params)
+        put(api("/projects/#{project.id}", developer), params: mirror_params)
 
         expect(response).to have_gitlab_http_status(:forbidden)
       end
@@ -250,7 +250,7 @@
         end
 
         it 'disables project packages feature' do
-          put(api("/projects/#{project.id}", user), packages_enabled: false)
+          put(api("/projects/#{project.id}", user), params: { packages_enabled: false })
 
           expect(response).to have_gitlab_http_status(200)
           expect(project.reload.packages_enabled).to be false
@@ -264,7 +264,7 @@
         end
 
         it 'disables project packages feature but does not return packages_enabled attribute' do
-          put(api("/projects/#{project.id}", user), packages_enabled: false)
+          put(api("/projects/#{project.id}", user), params: { packages_enabled: false })
 
           expect(response).to have_gitlab_http_status(200)
           expect(project.reload.packages_enabled).to be false
@@ -282,7 +282,7 @@
         create(:repository_state, :repository_failed, project: project)
         create(:repository_state, :wiki_failed, project: project1)
 
-        get api('/projects', user), repository_checksum_failed: true
+        get api('/projects', user), params: { repository_checksum_failed: true }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to include_pagination_headers
@@ -295,7 +295,7 @@
         create(:repository_state, :wiki_failed, project: project)
         create(:repository_state, :repository_failed, project: project1)
 
-        get api('/projects', user), wiki_checksum_failed: true
+        get api('/projects', user), params: { wiki_checksum_failed: true }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to include_pagination_headers
diff --git a/ee/spec/requests/api/runner_spec.rb b/ee/spec/requests/api/runner_spec.rb
index 43b9e10d28b624d95abcc01544fd1808345d60fe..21d369d18e09b6a9db3b05e1344cd377e4b12e07 100644
--- a/ee/spec/requests/api/runner_spec.rb
+++ b/ee/spec/requests/api/runner_spec.rb
@@ -66,7 +66,7 @@
       end
 
       def request_job(token = runner.token, **params)
-        post api('/jobs/request'), params.merge(token: token)
+        post api('/jobs/request'), params: params.merge(token: token)
       end
     end
   end
diff --git a/ee/spec/requests/api/search_spec.rb b/ee/spec/requests/api/search_spec.rb
index c3dd4aea6465556a8a7037da1f37bab60329587a..f18d3e75b2607e7c013e1f1370502f63c8f46581 100644
--- a/ee/spec/requests/api/search_spec.rb
+++ b/ee/spec/requests/api/search_spec.rb
@@ -15,19 +15,19 @@
 
   shared_examples 'elasticsearch disabled' do
     it 'returns 400 error for wiki_blobs scope' do
-      get api(endpoint, user), scope: 'wiki_blobs', search: 'awesome'
+      get api(endpoint, user), params: { scope: 'wiki_blobs', search: 'awesome' }
 
       expect(response).to have_gitlab_http_status(400)
     end
 
     it 'returns 400 error for blobs scope' do
-      get api(endpoint, user), scope: 'blobs', search: 'monitors'
+      get api(endpoint, user), params: { scope: 'blobs', search: 'monitors' }
 
       expect(response).to have_gitlab_http_status(400)
     end
 
     it 'returns 400 error for commits scope' do
-      get api(endpoint, user), scope: 'commits', search: 'folder'
+      get api(endpoint, user), params: { scope: 'commits', search: 'folder' }
 
       expect(response).to have_gitlab_http_status(400)
     end
@@ -52,7 +52,7 @@
         project.wiki.index_blobs
         Gitlab::Elastic::Helper.refresh_index
 
-        get api(endpoint, user), scope: 'wiki_blobs', search: 'awesome'
+        get api(endpoint, user), params: { scope: 'wiki_blobs', search: 'awesome' }
       end
 
       it_behaves_like 'response is correct', schema: 'public_api/v4/blobs'
@@ -63,7 +63,7 @@
         repo_project.repository.index_commits
         Gitlab::Elastic::Helper.refresh_index
 
-        get api(endpoint, user), scope: 'commits', search: 'folder'
+        get api(endpoint, user), params: { scope: 'commits', search: 'folder' }
       end
 
       it_behaves_like 'response is correct', schema: 'public_api/v4/commits_details', size: 2
@@ -74,14 +74,14 @@
         repo_project.repository.index_blobs
         Gitlab::Elastic::Helper.refresh_index
 
-        get api(endpoint, user), scope: 'blobs', search: 'monitors'
+        get api(endpoint, user), params: { scope: 'blobs', search: 'monitors' }
       end
 
       it_behaves_like 'response is correct', schema: 'public_api/v4/blobs'
 
       context 'filters' do
         it 'by filename' do
-          get api("/projects/#{repo_project.id}/search", user), scope: 'blobs', search: 'mon filename:PROCESS.md'
+          get api("/projects/#{repo_project.id}/search", user), params: { scope: 'blobs', search: 'mon filename:PROCESS.md' }
 
           expect(response).to have_gitlab_http_status(200)
           expect(json_response.size).to eq(1)
@@ -89,7 +89,7 @@
         end
 
         it 'by path' do
-          get api("/projects/#{repo_project.id}/search", user), scope: 'blobs', search: 'mon path:markdown'
+          get api("/projects/#{repo_project.id}/search", user), params: { scope: 'blobs', search: 'mon path:markdown' }
 
           expect(response).to have_gitlab_http_status(200)
           expect(json_response.size).to eq(1)
@@ -99,7 +99,7 @@
         end
 
         it 'by extension' do
-          get api("/projects/#{repo_project.id}/search", user), scope: 'blobs', search: 'mon extension:md'
+          get api("/projects/#{repo_project.id}/search", user), params: { scope: 'blobs', search: 'mon extension:md' }
 
           expect(response).to have_gitlab_http_status(200)
           expect(json_response.size).to eq(3)
diff --git a/ee/spec/requests/api/settings_spec.rb b/ee/spec/requests/api/settings_spec.rb
index 6cfd0f58eb40ff24b2b85d936cebe31b8a5341b1..f470e531e063f9dc621a252d2531021a31cb530f 100644
--- a/ee/spec/requests/api/settings_spec.rb
+++ b/ee/spec/requests/api/settings_spec.rb
@@ -16,12 +16,14 @@
       stub_licensed_features(custom_file_templates: true)
 
       put api("/application/settings", admin),
-        help_text: 'Help text',
-        snowplow_collector_uri: 'https://snowplow.example.com',
-        snowplow_cookie_domain: '.example.com',
-        snowplow_enabled: true,
-        snowplow_site_id:  'site_id',
-        file_template_project_id: project.id
+        params: {
+          help_text: 'Help text',
+          snowplow_collector_uri: 'https://snowplow.example.com',
+          snowplow_cookie_domain: '.example.com',
+          snowplow_enabled: true,
+          snowplow_site_id:  'site_id',
+          file_template_project_id: project.id
+        }
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['help_text']).to eq('Help text')
@@ -56,7 +58,7 @@
       end
 
       it 'does not update application settings' do
-        expect { put api("/application/settings", admin), settings }
+        expect { put api("/application/settings", admin), params: settings }
           .not_to change { ApplicationSetting.current.reload.attributes.slice(*attribute_names) }
       end
     end
@@ -76,7 +78,7 @@
       end
 
       it 'allows updating the settings' do
-        put api("/application/settings", admin), settings
+        put api("/application/settings", admin), params: settings
         expect(response).to have_gitlab_http_status(200)
 
         settings.each do |attribute, value|
@@ -126,7 +128,7 @@
 
   context "missing snowplow_collector_uri value when snowplow_enabled is true" do
     it "returns a blank parameter error message" do
-      put api("/application/settings", admin), snowplow_enabled: true
+      put api("/application/settings", admin), params: { snowplow_enabled: true }
 
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['error']).to eq('snowplow_collector_uri is missing')
diff --git a/ee/spec/requests/api/unleash_spec.rb b/ee/spec/requests/api/unleash_spec.rb
index 9dcb9ee3b7a370d5b0ef05ca682056ff5125caea..ac9186f1d2d1c72bbdb37d37abc67f5303c1df26 100644
--- a/ee/spec/requests/api/unleash_spec.rb
+++ b/ee/spec/requests/api/unleash_spec.rb
@@ -70,7 +70,7 @@
     describe "GET #{features_endpoint}" do
       let(:features_url) { features_endpoint.sub(':project_id', project_id) }
 
-      subject { get api("/feature_flags/unleash/#{project_id}/features"), params, headers }
+      subject { get api("/feature_flags/unleash/#{project_id}/features"), params: params, headers: headers }
 
       it_behaves_like 'authenticated request'
 
@@ -100,13 +100,13 @@
   end
 
   describe 'POST /feature_flags/unleash/:project_id/client/register' do
-    subject { post api("/feature_flags/unleash/#{project_id}/client/register"), params, headers }
+    subject { post api("/feature_flags/unleash/#{project_id}/client/register"), params: params, headers: headers }
 
     it_behaves_like 'authenticated request'
   end
 
   describe 'POST /feature_flags/unleash/:project_id/client/metrics' do
-    subject { post api("/feature_flags/unleash/#{project_id}/client/metrics"), params, headers }
+    subject { post api("/feature_flags/unleash/#{project_id}/client/metrics"), params: params, headers: headers }
 
     it_behaves_like 'authenticated request'
   end
diff --git a/ee/spec/requests/api/variables_spec.rb b/ee/spec/requests/api/variables_spec.rb
index f83879da6cd7805ab05c7d8222e37c3eb3633dcf..3efe1a1421a926437855996c3984936665ee41bb 100644
--- a/ee/spec/requests/api/variables_spec.rb
+++ b/ee/spec/requests/api/variables_spec.rb
@@ -14,7 +14,7 @@
 
       it 'creates variable with a specific environment scope' do
         expect do
-          post api("/projects/#{project.id}/variables", user), key: 'TEST_VARIABLE_2', value: 'VALUE_2', environment_scope: 'review/*'
+          post api("/projects/#{project.id}/variables", user), params: { key: 'TEST_VARIABLE_2', value: 'VALUE_2', environment_scope: 'review/*' }
         end.to change { project.variables(true).count }.by(1)
 
         expect(response).to have_gitlab_http_status(201)
@@ -27,7 +27,7 @@
         variable = create(:ci_variable, project: project)
 
         expect do
-          post api("/projects/#{project.id}/variables", user), key: variable.key, value: 'VALUE_2', environment_scope: 'review/*'
+          post api("/projects/#{project.id}/variables", user), params: { key: variable.key, value: 'VALUE_2', environment_scope: 'review/*' }
         end.to change { project.variables(true).count }.by(1)
 
         expect(response).to have_gitlab_http_status(201)
diff --git a/ee/spec/requests/git_http_geo_spec.rb b/ee/spec/requests/git_http_geo_spec.rb
index ebd12d845c84920be96247a98468a51aec5f82e4..6ab378e872a455b4dfdb3d5e5b121f0e8b9303b0 100644
--- a/ee/spec/requests/git_http_geo_spec.rb
+++ b/ee/spec/requests/git_http_geo_spec.rb
@@ -81,7 +81,7 @@
     describe 'GET info_refs' do
       context 'git pull' do
         def make_request
-          get "/#{project.full_path}.git/info/refs", { service: 'git-upload-pack' }, env
+          get "/#{project.full_path}.git/info/refs", params: { service: 'git-upload-pack' }, headers: env
         end
 
         it_behaves_like 'Geo request'
@@ -97,7 +97,7 @@ def make_request
 
       context 'git push' do
         def make_request
-          get url, { service: 'git-receive-pack' }, env
+          get url, params: { service: 'git-receive-pack' }, headers: env
         end
 
         let(:url) { "/#{project.full_path}.git/info/refs" }
@@ -117,7 +117,7 @@ def make_request
 
     describe 'POST git_upload_pack' do
       def make_request
-        post "/#{project.full_path}.git/git-upload-pack", {}, env
+        post "/#{project.full_path}.git/git-upload-pack", params: {}, headers: env
       end
 
       it_behaves_like 'Geo request'
@@ -135,7 +135,7 @@ def make_request
       context 'API' do
         describe 'POST batch' do
           def make_request
-            post url, args, env
+            post url, params: args, headers: env
           end
 
           let(:args) { {} }
@@ -238,7 +238,7 @@ def make_request
         with_them do
           describe "POST #{description}" do
             def make_request
-              post url, args, env
+              post url, params: args, headers: env
             end
 
             let(:url) { "/#{project.full_path}.git/#{path}" }
@@ -264,7 +264,7 @@ def make_request
 
     describe 'POST git_receive_pack' do
       def make_request
-        post url, {}, env
+        post url, params: {}, headers: env
       end
 
       let(:url) { "/#{project.full_path}.git/git-receive-pack" }
diff --git a/ee/spec/requests/omniauth_kerberos_spnego_spec.rb b/ee/spec/requests/omniauth_kerberos_spnego_spec.rb
index fc4dc09cc777f2baeef24985b75bd063a1a1811c..6bed4cd273903287708e637cedff1da414f10301 100644
--- a/ee/spec/requests/omniauth_kerberos_spnego_spec.rb
+++ b/ee/spec/requests/omniauth_kerberos_spnego_spec.rb
@@ -24,7 +24,7 @@
       expect_any_instance_of(controller_class).to receive(:spnego_credentials!)
         .with('fake spnego token')
 
-      get path, {}, spnego_header
+      get path, params: {}, headers: spnego_header
     end
   end
 
@@ -35,13 +35,13 @@
     end
 
     it 'redirects to the omniauth callback' do
-      get path, {}, spnego_header
+      get path, params: {}, headers: spnego_header
 
       expect(response).to redirect_to('/users/auth/kerberos_spnego/callback')
     end
 
     it 'stores the users principal name in the session' do
-      get path, {}, spnego_header
+      get path, params: {}, headers: spnego_header
 
       expect(session[:kerberos_spnego_principal_name]).to eq('janedoe@EXAMPLE.COM')
     end
@@ -50,7 +50,7 @@
       allow_any_instance_of(controller_class).to receive(:spnego_response_token)
         .and_return("it's the final token")
 
-      get path, {}, spnego_header
+      get path, params: {}, headers: spnego_header
 
       expect(response.header['Www-Authenticate']).to eq(
         "Negotiate #{Base64.strict_encode64("it's the final token")}"
diff --git a/ee/spec/requests/projects/mirrors_controller_spec.rb b/ee/spec/requests/projects/mirrors_controller_spec.rb
index c66e279888f805dcf0ac788d7fcbba6d8b526cb8..999847e465e7ba784a7efdff4c8a5010f3aeced7 100644
--- a/ee/spec/requests/projects/mirrors_controller_spec.rb
+++ b/ee/spec/requests/projects/mirrors_controller_spec.rb
@@ -17,11 +17,13 @@
 
     it 'complains about passing an empty URL' do
       patch project_mirror_path(project),
-        project: {
-        mirror: '1',
-        import_url: '',
-        mirror_user_id: user.id,
-        mirror_trigger_builds: '0'
+        params: {
+                project: {
+          mirror: '1',
+          import_url: '',
+          mirror_user_id: user.id,
+          mirror_trigger_builds: '0'
+        }
       }
 
       expect(response).to have_gitlab_http_status(302)
diff --git a/ee/spec/requests/projects/path_locks_controller_spec.rb b/ee/spec/requests/projects/path_locks_controller_spec.rb
index 1e51fba49608e5eaf84974f80e33f85848e83979..f6022a387f9e65907031a15f4aa90c9790af11e8 100644
--- a/ee/spec/requests/projects/path_locks_controller_spec.rb
+++ b/ee/spec/requests/projects/path_locks_controller_spec.rb
@@ -113,6 +113,6 @@
   end
 
   def toggle_lock(path)
-    post toggle_project_path_locks_path(project), path: path
+    post toggle_project_path_locks_path(project), params: { path: path }
   end
 end
diff --git a/ee/spec/requests/rack_attack_global_spec.rb b/ee/spec/requests/rack_attack_global_spec.rb
index 70e4a6652a631989ed2f517dc8ed8f89c2641a72..c871b1363b2cf1c94ed0832e398d6f58b0c203f6 100644
--- a/ee/spec/requests/rack_attack_global_spec.rb
+++ b/ee/spec/requests/rack_attack_global_spec.rb
@@ -25,7 +25,7 @@
 
     it 'allows requests over the rate limit' do
       (1 + requests_per_period).times do
-        get "/#{project.full_path}.git/info/refs", { service: 'git-upload-pack' }, { 'Authorization' => "#{::Gitlab::Geo::BaseRequest::GITLAB_GEO_AUTH_TOKEN_TYPE} token" }
+        get "/#{project.full_path}.git/info/refs", params: { service: 'git-upload-pack' }, headers: { 'Authorization' => "#{::Gitlab::Geo::BaseRequest::GITLAB_GEO_AUTH_TOKEN_TYPE} token" }
         expect(response).to have_http_status 401
       end
     end
diff --git a/ee/spec/requests/smartcard_controller_spec.rb b/ee/spec/requests/smartcard_controller_spec.rb
index b06b4a7ff8323207d173ed3c4014e79f111c8719..53e8165563a5780ac648845caaa3a67028824a14 100644
--- a/ee/spec/requests/smartcard_controller_spec.rb
+++ b/ee/spec/requests/smartcard_controller_spec.rb
@@ -10,7 +10,7 @@
   let(:openssl_certificate) { instance_double(OpenSSL::X509::Certificate, subject: subject_dn, issuer: issuer_dn) }
   let(:audit_event_service) { instance_double(AuditEventService) }
 
-  subject { post '/-/smartcard/auth', {}, certificate_headers }
+  subject { post '/-/smartcard/auth', params: {}, headers: certificate_headers }
 
   describe '#auth' do
     context 'with smartcard_auth enabled' do
diff --git a/ee/spec/support/shared_examples/assignee_board_list.rb b/ee/spec/support/shared_examples/assignee_board_list.rb
index 9cbf05710f5917885446c4e90071ba2b79966fb9..6bf9da38182985a855c41037f7be89d2726b2d4e 100644
--- a/ee/spec/support/shared_examples/assignee_board_list.rb
+++ b/ee/spec/support/shared_examples/assignee_board_list.rb
@@ -3,7 +3,7 @@
   context 'when assignee_id is sent' do
     it 'returns 400 if user is not found' do
       other_user = create(:user)
-      post api(url, user), assignee_id: other_user.id
+      post api(url, user), params: { assignee_id: other_user.id }
 
       expect(response).to have_gitlab_http_status(400)
       expect(json_response.dig('message', 'error')).to eq('User not found!')
@@ -12,7 +12,7 @@
     it 'returns 400 if assignee list feature is not available' do
       stub_licensed_features(board_assignee_lists: false)
 
-      post api(url, user), assignee_id: user.id
+      post api(url, user), params: { assignee_id: user.id }
 
       expect(response).to have_gitlab_http_status(400)
       expect(json_response.dig('message', 'list_type'))
@@ -22,7 +22,7 @@
     it 'creates an assignee list if user is found' do
       stub_licensed_features(board_assignee_lists: true)
 
-      post api(url, user), assignee_id: user.id
+      post api(url, user), params: { assignee_id: user.id }
 
       expect(response).to have_gitlab_http_status(201)
       expect(json_response.dig('assignee', 'id')).to eq(user.id)
diff --git a/ee/spec/support/shared_examples/controllers/multiple_issue_board_show.rb b/ee/spec/support/shared_examples/controllers/multiple_issue_board_show.rb
index 3f2dd0940801fcbaf2a4758ec4e93c5ff6f0f5ca..ae4f8d5772ff940efad245eedc484da981511200 100644
--- a/ee/spec/support/shared_examples/controllers/multiple_issue_board_show.rb
+++ b/ee/spec/support/shared_examples/controllers/multiple_issue_board_show.rb
@@ -44,6 +44,6 @@ def show(board)
       params.merge!(namespace_id: parent.namespace, project_id: parent)
     end
 
-    get :show, params
+    get :show, params: params
   end
 end
diff --git a/ee/spec/support/shared_examples/milestone_board_list.rb b/ee/spec/support/shared_examples/milestone_board_list.rb
index 6aeacac03e92aa5c46c54fff26eeac60b746230d..0be72ca52bd70649d09ac60f06ebade0bff85f20 100644
--- a/ee/spec/support/shared_examples/milestone_board_list.rb
+++ b/ee/spec/support/shared_examples/milestone_board_list.rb
@@ -2,7 +2,7 @@
   context 'when milestone_id is sent' do
     it 'returns 400 if milestone is not found' do
       other_milestone = create(:milestone)
-      post api(url, user), milestone_id: other_milestone.id
+      post api(url, user), params: { milestone_id: other_milestone.id }
 
       expect(response).to have_gitlab_http_status(400)
       expect(json_response.dig('message', 'error')).to eq('Milestone not found!')
@@ -11,7 +11,7 @@
     it 'returns 400 if milestone list feature is not available' do
       stub_licensed_features(board_milestone_lists: false)
 
-      post api(url, user), milestone_id: milestone.id
+      post api(url, user), params: { milestone_id: milestone.id }
 
       expect(response).to have_gitlab_http_status(400)
       expect(json_response.dig('message', 'list_type'))
@@ -21,7 +21,7 @@
     it 'creates a milestone list if milestone is found' do
       stub_licensed_features(board_milestone_lists: true)
 
-      post api(url, user), milestone_id: milestone.id
+      post api(url, user), params: { milestone_id: milestone.id }
 
       expect(response).to have_gitlab_http_status(201)
       expect(json_response.dig('milestone', 'id')).to eq(milestone.id)
diff --git a/ee/spec/support/shared_examples/multiple_and_scoped_issue_boards_.rb b/ee/spec/support/shared_examples/multiple_and_scoped_issue_boards_.rb
index a2af8f6a381c0bf129c2f07f0314550d78568b13..a49653d0734b0260aae8af74a8f49dcef1e63513 100644
--- a/ee/spec/support/shared_examples/multiple_and_scoped_issue_boards_.rb
+++ b/ee/spec/support/shared_examples/multiple_and_scoped_issue_boards_.rb
@@ -9,7 +9,7 @@
 
     describe "POST #{route_definition}" do
       it 'creates a board' do
-        post api(root_url, user), name: "new board"
+        post api(root_url, user), params: { name: "new board" }
 
         expect(response).to have_gitlab_http_status(201)
 
@@ -21,7 +21,7 @@
       let(:url) { "#{root_url}/#{board.id}" }
 
       it 'updates a board' do
-        put api(url, user), name: 'new name', weight: 4, labels: 'foo, bar'
+        put api(url, user), params: { name: 'new name', weight: 4, labels: 'foo, bar' }
 
         expect(response).to have_gitlab_http_status(200)
 
diff --git a/spec/controllers/abuse_reports_controller_spec.rb b/spec/controllers/abuse_reports_controller_spec.rb
index ada011e7595af063a1c664fff8a15274d2a7c4f6..7104305e9d251c32cdf34c255e36af413f01cd2e 100644
--- a/spec/controllers/abuse_reports_controller_spec.rb
+++ b/spec/controllers/abuse_reports_controller_spec.rb
@@ -19,7 +19,7 @@
         user_id = user.id
         user.destroy
 
-        get :new, { user_id: user_id }
+        get :new, params: { user_id: user_id }
 
         expect(response).to redirect_to root_path
         expect(flash[:alert]).to eq('Cannot create the abuse report. The user has been deleted.')
@@ -30,7 +30,7 @@
       it 'redirects the reporter to the user\'s profile' do
         user.block
 
-        get :new, { user_id: user.id }
+        get :new, params: { user_id: user.id }
 
         expect(response).to redirect_to user
         expect(flash[:alert]).to eq('Cannot create the abuse report. This user has been blocked.')
@@ -42,18 +42,18 @@
     context 'with valid attributes' do
       it 'saves the abuse report' do
         expect do
-          post :create, abuse_report: attrs
+          post :create, params: { abuse_report: attrs }
         end.to change { AbuseReport.count }.by(1)
       end
 
       it 'calls notify' do
         expect_any_instance_of(AbuseReport).to receive(:notify)
 
-        post :create, abuse_report: attrs
+        post :create, params: { abuse_report: attrs }
       end
 
       it 'redirects back to the reported user' do
-        post :create, abuse_report: attrs
+        post :create, params: { abuse_report: attrs }
 
         expect(response).to redirect_to user
       end
@@ -62,7 +62,7 @@
     context 'with invalid attributes' do
       it 'renders new' do
         attrs.delete(:user_id)
-        post :create, abuse_report: attrs
+        post :create, params: { abuse_report: attrs }
 
         expect(response).to render_template(:new)
       end
diff --git a/spec/controllers/admin/application_settings_controller_spec.rb b/spec/controllers/admin/application_settings_controller_spec.rb
index 2e0f79cd313851f9e52caf6d924bd334cac6e635..9af472df74ee0edbcae64f27e9893ccdb1e3b479 100644
--- a/spec/controllers/admin/application_settings_controller_spec.rb
+++ b/spec/controllers/admin/application_settings_controller_spec.rb
@@ -52,35 +52,35 @@
     end
 
     it 'updates the password_authentication_enabled_for_git setting' do
-      put :update, application_setting: { password_authentication_enabled_for_git: "0" }
+      put :update, params: { application_setting: { password_authentication_enabled_for_git: "0" } }
 
       expect(response).to redirect_to(admin_application_settings_path)
       expect(ApplicationSetting.current.password_authentication_enabled_for_git).to eq(false)
     end
 
     it 'updates the default_project_visibility for string value' do
-      put :update, application_setting: { default_project_visibility: "20" }
+      put :update, params: { application_setting: { default_project_visibility: "20" } }
 
       expect(response).to redirect_to(admin_application_settings_path)
       expect(ApplicationSetting.current.default_project_visibility).to eq(Gitlab::VisibilityLevel::PUBLIC)
     end
 
     it 'update the restricted levels for string values' do
-      put :update, application_setting: { restricted_visibility_levels: %w[10 20] }
+      put :update, params: { application_setting: { restricted_visibility_levels: %w[10 20] } }
 
       expect(response).to redirect_to(admin_application_settings_path)
       expect(ApplicationSetting.current.restricted_visibility_levels).to eq([10, 20])
     end
 
     it 'updates the restricted_visibility_levels when empty array is passed' do
-      put :update, application_setting: { restricted_visibility_levels: [""] }
+      put :update, params: { application_setting: { restricted_visibility_levels: [""] } }
 
       expect(response).to redirect_to(admin_application_settings_path)
       expect(ApplicationSetting.current.restricted_visibility_levels).to be_empty
     end
 
     it 'updates the receive_max_input_size setting' do
-      put :update, application_setting: { receive_max_input_size: "1024" }
+      put :update, params: { application_setting: { receive_max_input_size: "1024" } }
 
       expect(response).to redirect_to(admin_application_settings_path)
       expect(ApplicationSetting.current.receive_max_input_size).to eq(1024)
diff --git a/spec/controllers/admin/applications_controller_spec.rb b/spec/controllers/admin/applications_controller_spec.rb
index c7441bb7904da8afd35d049bca7c74b93a3246ad..e951c8dd380ee6ecaa0fee196d5217e9c4105a99 100644
--- a/spec/controllers/admin/applications_controller_spec.rb
+++ b/spec/controllers/admin/applications_controller_spec.rb
@@ -19,7 +19,7 @@
 
   describe 'GET #edit' do
     it 'renders the application form' do
-      get :edit, id: application.id
+      get :edit, params: { id: application.id }
 
       expect(response).to render_template :edit
       expect(assigns[:scopes]).to be_kind_of(Doorkeeper::OAuth::Scopes)
@@ -33,7 +33,7 @@
       create_params = attributes_for(:application, trusted: true)
 
       expect do
-        post :create, doorkeeper_application: create_params
+        post :create, params: { doorkeeper_application: create_params }
       end.to change { Doorkeeper::Application.count }.by(1)
 
       application = Doorkeeper::Application.last
@@ -45,7 +45,7 @@
 
     it 'renders the application form on errors' do
       expect do
-        post :create, doorkeeper_application: attributes_for(:application).merge(redirect_uri: nil)
+        post :create, params: { doorkeeper_application: attributes_for(:application).merge(redirect_uri: nil) }
       end.not_to change { Doorkeeper::Application.count }
 
       expect(response).to render_template :new
@@ -55,7 +55,7 @@
 
   describe 'PATCH #update' do
     it 'updates the application' do
-      patch :update, id: application.id, doorkeeper_application: { redirect_uri: 'http://example.com/', trusted: true }
+      patch :update, params: { id: application.id, doorkeeper_application: { redirect_uri: 'http://example.com/', trusted: true } }
 
       application.reload
 
@@ -64,7 +64,7 @@
     end
 
     it 'renders the application form on errors' do
-      patch :update, id: application.id, doorkeeper_application: { redirect_uri: nil }
+      patch :update, params: { id: application.id, doorkeeper_application: { redirect_uri: nil } }
 
       expect(response).to render_template :edit
       expect(assigns[:scopes]).to be_kind_of(Doorkeeper::OAuth::Scopes)
diff --git a/spec/controllers/admin/groups_controller_spec.rb b/spec/controllers/admin/groups_controller_spec.rb
index 0dad95e418f8ea01ba6e3cf20cca3790e869b3d5..647fce0ecef41afae93b28947e3968de52f2c420 100644
--- a/spec/controllers/admin/groups_controller_spec.rb
+++ b/spec/controllers/admin/groups_controller_spec.rb
@@ -12,12 +12,12 @@
   describe 'DELETE #destroy' do
     it 'schedules a group destroy' do
       Sidekiq::Testing.fake! do
-        expect { delete :destroy, id: project.group.path }.to change(GroupDestroyWorker.jobs, :size).by(1)
+        expect { delete :destroy, params: { id: project.group.path } }.to change(GroupDestroyWorker.jobs, :size).by(1)
       end
     end
 
     it 'redirects to the admin group path' do
-      delete :destroy, id: project.group.path
+      delete :destroy, params: { id: project.group.path }
 
       expect(response).to redirect_to(admin_groups_path)
     end
@@ -27,9 +27,11 @@
     let(:group_user) { create(:user) }
 
     it 'adds user to members' do
-      put :members_update, id: group,
-                           user_ids: group_user.id,
-                           access_level: Gitlab::Access::GUEST
+      put :members_update, params: {
+                             id: group,
+                             user_ids: group_user.id,
+                             access_level: Gitlab::Access::GUEST
+                           }
 
       expect(response).to set_flash.to 'Users were successfully added.'
       expect(response).to redirect_to(admin_group_path(group))
@@ -37,18 +39,22 @@
     end
 
     it 'can add unlimited members' do
-      put :members_update, id: group,
-                           user_ids: 1.upto(1000).to_a.join(','),
-                           access_level: Gitlab::Access::GUEST
+      put :members_update, params: {
+                             id: group,
+                             user_ids: 1.upto(1000).to_a.join(','),
+                             access_level: Gitlab::Access::GUEST
+                           }
 
       expect(response).to set_flash.to 'Users were successfully added.'
       expect(response).to redirect_to(admin_group_path(group))
     end
 
     it 'adds no user to members' do
-      put :members_update, id: group,
-                           user_ids: '',
-                           access_level: Gitlab::Access::GUEST
+      put :members_update, params: {
+                             id: group,
+                             user_ids: '',
+                             access_level: Gitlab::Access::GUEST
+                           }
 
       expect(response).to set_flash.to 'No users specified.'
       expect(response).to redirect_to(admin_group_path(group))
diff --git a/spec/controllers/admin/hooks_controller_spec.rb b/spec/controllers/admin/hooks_controller_spec.rb
index d2c1e634930cb81b0f2e4c1cf9e54565ff6f3ab4..9bc58344e4ebb6008d31c353968aebf4891d3734 100644
--- a/spec/controllers/admin/hooks_controller_spec.rb
+++ b/spec/controllers/admin/hooks_controller_spec.rb
@@ -20,7 +20,7 @@
         merge_requests_events: true
       }
 
-      post :create, hook: hook_params
+      post :create, params: { hook: hook_params }
 
       expect(response).to have_gitlab_http_status(302)
       expect(SystemHook.all.size).to eq(1)
diff --git a/spec/controllers/admin/identities_controller_spec.rb b/spec/controllers/admin/identities_controller_spec.rb
index a29853bf8df2fe449b03a18eb806246e1d1aecf4..e5428c8ddeb6372b362131cc3881fb70a37f8e0c 100644
--- a/spec/controllers/admin/identities_controller_spec.rb
+++ b/spec/controllers/admin/identities_controller_spec.rb
@@ -13,7 +13,7 @@
     it 'repairs ldap blocks' do
       expect_any_instance_of(RepairLdapBlockedUserService).to receive(:execute)
 
-      put :update, user_id: user.username, id: user.ldap_identity.id, identity: { provider: 'twitter' }
+      put :update, params: { user_id: user.username, id: user.ldap_identity.id, identity: { provider: 'twitter' } }
     end
   end
 
@@ -23,7 +23,7 @@
     it 'repairs ldap blocks' do
       expect_any_instance_of(RepairLdapBlockedUserService).to receive(:execute)
 
-      delete :destroy, user_id: user.username, id: user.ldap_identity.id
+      delete :destroy, params: { user_id: user.username, id: user.ldap_identity.id }
     end
   end
 end
diff --git a/spec/controllers/admin/projects_controller_spec.rb b/spec/controllers/admin/projects_controller_spec.rb
index ee1aff09bdf1620f6683bc8d5fb2a3bf382f64a0..8166657f6747e1c2017210047c3d9076616f46d3 100644
--- a/spec/controllers/admin/projects_controller_spec.rb
+++ b/spec/controllers/admin/projects_controller_spec.rb
@@ -11,13 +11,13 @@
     render_views
 
     it 'retrieves the project for the given visibility level' do
-      get :index, visibility_level: [Gitlab::VisibilityLevel::PUBLIC]
+      get :index, params: { visibility_level: [Gitlab::VisibilityLevel::PUBLIC] }
 
       expect(response.body).to match(project.name)
     end
 
     it 'does not retrieve the project' do
-      get :index, visibility_level: [Gitlab::VisibilityLevel::INTERNAL]
+      get :index, params: { visibility_level: [Gitlab::VisibilityLevel::INTERNAL] }
 
       expect(response.body).not_to match(project.name)
     end
@@ -47,7 +47,7 @@
     render_views
 
     it 'renders show page' do
-      get :show, namespace_id: project.namespace.path, id: project.path
+      get :show, params: { namespace_id: project.namespace.path, id: project.path }
 
       expect(response).to have_gitlab_http_status(200)
       expect(response.body).to match(project.name)
diff --git a/spec/controllers/admin/runners_controller_spec.rb b/spec/controllers/admin/runners_controller_spec.rb
index 312dbdd0624fd0ca99f0328842c7becf1f8138ae..4cf14030ca1255091d7cedc5e1e65bff7c38980d 100644
--- a/spec/controllers/admin/runners_controller_spec.rb
+++ b/spec/controllers/admin/runners_controller_spec.rb
@@ -17,13 +17,13 @@
 
   describe '#show' do
     it 'shows a particular runner' do
-      get :show, id: runner.id
+      get :show, params: { id: runner.id }
 
       expect(response).to have_gitlab_http_status(200)
     end
 
     it 'shows 404 for unknown runner' do
-      get :show, id: 0
+      get :show, params: { id: 0 }
 
       expect(response).to have_gitlab_http_status(404)
     end
@@ -34,7 +34,7 @@
       new_desc = runner.description.swapcase
 
       expect do
-        post :update, id: runner.id, runner: { description: new_desc }
+        post :update, params: { id: runner.id, runner: { description: new_desc } }
       end.to change { runner.ensure_runner_queue_value }
 
       runner.reload
@@ -46,7 +46,7 @@
 
   describe '#destroy' do
     it 'destroys the runner' do
-      delete :destroy, id: runner.id
+      delete :destroy, params: { id: runner.id }
 
       expect(response).to have_gitlab_http_status(302)
       expect(Ci::Runner.find_by(id: runner.id)).to be_nil
@@ -58,7 +58,7 @@
       runner.update(active: false)
 
       expect do
-        post :resume, id: runner.id
+        post :resume, params: { id: runner.id }
       end.to change { runner.ensure_runner_queue_value }
 
       runner.reload
@@ -73,7 +73,7 @@
       runner.update(active: true)
 
       expect do
-        post :pause, id: runner.id
+        post :pause, params: { id: runner.id }
       end.to change { runner.ensure_runner_queue_value }
 
       runner.reload
diff --git a/spec/controllers/admin/services_controller_spec.rb b/spec/controllers/admin/services_controller_spec.rb
index 4439ea4a53377a5c80b153cf8ba555ec5065820f..ec161b92245b1c55c9d215e980b0c88ce6face50 100644
--- a/spec/controllers/admin/services_controller_spec.rb
+++ b/spec/controllers/admin/services_controller_spec.rb
@@ -18,7 +18,7 @@
         end
 
         it 'successfully displays the template' do
-          get :edit, id: service.id
+          get :edit, params: { id: service.id }
 
           expect(response).to have_gitlab_http_status(200)
         end
@@ -44,7 +44,7 @@
     it 'calls the propagation worker when service is active' do
       expect(PropagateServiceTemplateWorker).to receive(:perform_async).with(service.id)
 
-      put :update, id: service.id, service: { active: true }
+      put :update, params: { id: service.id, service: { active: true } }
 
       expect(response).to have_gitlab_http_status(302)
     end
@@ -52,7 +52,7 @@
     it 'does not call the propagation worker when service is not active' do
       expect(PropagateServiceTemplateWorker).not_to receive(:perform_async)
 
-      put :update, id: service.id, service: { properties: {} }
+      put :update, params: { id: service.id, service: { properties: {} } }
 
       expect(response).to have_gitlab_http_status(302)
     end
diff --git a/spec/controllers/admin/spam_logs_controller_spec.rb b/spec/controllers/admin/spam_logs_controller_spec.rb
index 7a96ef6a5cc32d8d6ea10d58ecd658586edf1226..2b946ec1c68240ec61c1b57254fa29e7b58ba570 100644
--- a/spec/controllers/admin/spam_logs_controller_spec.rb
+++ b/spec/controllers/admin/spam_logs_controller_spec.rb
@@ -20,13 +20,13 @@
 
   describe '#destroy' do
     it 'removes only the spam log when removing log' do
-      expect { delete :destroy, id: first_spam.id }.to change { SpamLog.count }.by(-1)
+      expect { delete :destroy, params: { id: first_spam.id } }.to change { SpamLog.count }.by(-1)
       expect(User.find(user.id)).to be_truthy
       expect(response).to have_gitlab_http_status(200)
     end
 
     it 'removes user and his spam logs when removing the user' do
-      delete :destroy, id: first_spam.id, remove_user: true
+      delete :destroy, params: { id: first_spam.id, remove_user: true }
 
       expect(flash[:notice]).to eq "User #{user.username} was successfully removed."
       expect(response).to have_gitlab_http_status(302)
@@ -40,7 +40,7 @@
       allow_any_instance_of(AkismetService).to receive(:submit_ham).and_return(true)
     end
     it 'submits the log as ham' do
-      post :mark_as_ham, id: first_spam.id
+      post :mark_as_ham, params: { id: first_spam.id }
 
       expect(response).to have_gitlab_http_status(302)
       expect(SpamLog.find(first_spam.id).submitted_as_ham).to be_truthy
diff --git a/spec/controllers/admin/users_controller_spec.rb b/spec/controllers/admin/users_controller_spec.rb
index 3dd0b2623ace244cdf02006886b8d8a8a2ed1398..6b66cbd2651618ecfe0211d3d333c37860b66900 100644
--- a/spec/controllers/admin/users_controller_spec.rb
+++ b/spec/controllers/admin/users_controller_spec.rb
@@ -17,7 +17,7 @@
     end
 
     it 'deletes user and ghosts their contributions' do
-      delete :destroy, id: user.username, format: :json
+      delete :destroy, params: { id: user.username }, format: :json
 
       expect(response).to have_gitlab_http_status(200)
       expect(User.exists?(user.id)).to be_falsy
@@ -25,7 +25,7 @@
     end
 
     it 'deletes the user and their contributions when hard delete is specified' do
-      delete :destroy, id: user.username, hard_delete: true, format: :json
+      delete :destroy, params: { id: user.username, hard_delete: true }, format: :json
 
       expect(response).to have_gitlab_http_status(200)
       expect(User.exists?(user.id)).to be_falsy
@@ -35,7 +35,7 @@
 
   describe 'PUT block/:id' do
     it 'blocks user' do
-      put :block, id: user.username
+      put :block, params: { id: user.username }
       user.reload
       expect(user.blocked?).to be_truthy
       expect(flash[:notice]).to eq 'Successfully blocked'
@@ -51,7 +51,7 @@
       end
 
       it 'does not unblock user' do
-        put :unblock, id: user.username
+        put :unblock, params: { id: user.username }
         user.reload
         expect(user.blocked?).to be_truthy
         expect(flash[:alert]).to eq 'This user cannot be unlocked manually from GitLab'
@@ -64,7 +64,7 @@
       end
 
       it 'unblocks user' do
-        put :unblock, id: user.username
+        put :unblock, params: { id: user.username }
         user.reload
         expect(user.blocked?).to be_falsey
         expect(flash[:notice]).to eq 'Successfully unblocked'
@@ -79,7 +79,7 @@
     end
 
     it 'unlocks user' do
-      put :unlock, id: user.username
+      put :unlock, params: { id: user.username }
       user.reload
       expect(user.access_locked?).to be_falsey
     end
@@ -93,7 +93,7 @@
     end
 
     it 'confirms user' do
-      put :confirm, id: user.username
+      put :confirm, params: { id: user.username }
       user.reload
       expect(user.confirmed?).to be_truthy
     end
@@ -121,17 +121,17 @@
     end
 
     def go
-      patch :disable_two_factor, id: user.to_param
+      patch :disable_two_factor, params: { id: user.to_param }
     end
   end
 
   describe 'POST create' do
     it 'creates the user' do
-      expect { post :create, user: attributes_for(:user) }.to change { User.count }.by(1)
+      expect { post :create, params: { user: attributes_for(:user) } }.to change { User.count }.by(1)
     end
 
     it 'shows only one error message for an invalid email' do
-      post :create, user: attributes_for(:user, email: 'bogus')
+      post :create, params: { user: attributes_for(:user, email: 'bogus') }
       expect(assigns[:user].errors).to contain_exactly("Email is invalid")
     end
   end
@@ -147,7 +147,7 @@ def update_password(user, password, password_confirmation = nil)
           }
         }
 
-        post :update, params
+        post :update, params: params
       end
 
       context 'when the admin changes his own password' do
@@ -227,13 +227,13 @@ def update_password(user, password, password_confirmation = nil)
       end
 
       it "shows a notice" do
-        post :impersonate, id: user.username
+        post :impersonate, params: { id: user.username }
 
         expect(flash[:alert]).to eq("You cannot impersonate a blocked user")
       end
 
       it "doesn't sign us in as the user" do
-        post :impersonate, id: user.username
+        post :impersonate, params: { id: user.username }
 
         expect(warden.user).to eq(admin)
       end
@@ -241,25 +241,25 @@ def update_password(user, password, password_confirmation = nil)
 
     context "when the user is not blocked" do
       it "stores the impersonator in the session" do
-        post :impersonate, id: user.username
+        post :impersonate, params: { id: user.username }
 
         expect(session[:impersonator_id]).to eq(admin.id)
       end
 
       it "signs us in as the user" do
-        post :impersonate, id: user.username
+        post :impersonate, params: { id: user.username }
 
         expect(warden.user).to eq(user)
       end
 
       it "redirects to root" do
-        post :impersonate, id: user.username
+        post :impersonate, params: { id: user.username }
 
         expect(response).to redirect_to(root_path)
       end
 
       it "shows a notice" do
-        post :impersonate, id: user.username
+        post :impersonate, params: { id: user.username }
 
         expect(flash[:alert]).to eq("You are now impersonating #{user.username}")
       end
@@ -271,7 +271,7 @@ def update_password(user, password, password_confirmation = nil)
       end
 
       it "shows error page" do
-        post :impersonate, id: user.username
+        post :impersonate, params: { id: user.username }
 
         expect(response).to have_gitlab_http_status(404)
       end
diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb
index 945c9f97fc35687da11519741c3998f137e50c70..43f561f7a256ce3208942928fc9587c5311d764f 100644
--- a/spec/controllers/application_controller_spec.rb
+++ b/spec/controllers/application_controller_spec.rb
@@ -522,13 +522,13 @@ def index
     end
 
     it 'renders a 403 when a message is passed to access denied' do
-      get :index, message: 'None shall pass'
+      get :index, params: { message: 'None shall pass' }
 
       expect(response).to have_gitlab_http_status(403)
     end
 
     it 'renders a status passed to access denied' do
-      get :index, status: 401
+      get :index, params: { status: 401 }
 
       expect(response).to have_gitlab_http_status(401)
     end
@@ -548,7 +548,7 @@ def index
     end
 
     context 'html' do
-      subject { get :index, text: "hi \255" }
+      subject { get :index, params: { text: "hi \255" } }
 
       it 'renders 412' do
         expect { subject }.to raise_error(ActionController::BadRequest)
@@ -556,7 +556,7 @@ def index
     end
 
     context 'js' do
-      subject { get :index, text: "hi \255", format: :js }
+      subject { get :index, format: :js, params: { text: "hi \255" } }
 
       it 'renders 412' do
         expect { subject }.to raise_error(ActionController::BadRequest)
diff --git a/spec/controllers/autocomplete_controller_spec.rb b/spec/controllers/autocomplete_controller_spec.rb
index 1402ddef150a404a1987ea2c56342424af2a60df..89b43928cb645a853801c22fd9c206179237ca59 100644
--- a/spec/controllers/autocomplete_controller_spec.rb
+++ b/spec/controllers/autocomplete_controller_spec.rb
@@ -15,7 +15,7 @@
 
       describe 'GET #users with project ID' do
         before do
-          get(:users, project_id: project.id)
+          get(:users, params: { project_id: project.id })
         end
 
         it 'returns the project members' do
@@ -27,7 +27,7 @@
 
       describe 'GET #users with unknown project' do
         before do
-          get(:users, project_id: 'unknown')
+          get(:users, params: { project_id: 'unknown' })
         end
 
         it { expect(response).to have_gitlab_http_status(404) }
@@ -44,7 +44,7 @@
 
       describe 'GET #users with group ID' do
         before do
-          get(:users, group_id: group.id)
+          get(:users, params: { group_id: group.id })
         end
 
         it 'returns the group members' do
@@ -56,7 +56,7 @@
 
       describe 'GET #users with unknown group ID' do
         before do
-          get(:users, group_id: 'unknown')
+          get(:users, params: { group_id: 'unknown' })
         end
 
         it { expect(response).to have_gitlab_http_status(404) }
@@ -72,7 +72,7 @@
 
       describe 'GET #users with project ID' do
         before do
-          get(:users, project_id: project.id, current_user: true)
+          get(:users, params: { project_id: project.id, current_user: true })
         end
 
         it 'returns the project members and non-members' do
@@ -100,7 +100,7 @@
         user1 = create(:user, username: 'user1', name: 'Ian')
 
         sign_in(user)
-        get(:users, search: 'user')
+        get(:users, params: { search: 'user' })
 
         response_usernames = json_response.map { |user| user['username']  }
 
@@ -128,7 +128,7 @@
       describe 'GET #users with public project' do
         before do
           public_project.add_guest(user)
-          get(:users, project_id: public_project.id)
+          get(:users, params: { project_id: public_project.id })
         end
 
         it { expect(json_response).to be_kind_of(Array) }
@@ -137,7 +137,7 @@
 
       describe 'GET #users with project' do
         before do
-          get(:users, project_id: project.id)
+          get(:users, params: { project_id: project.id })
         end
 
         it { expect(response).to have_gitlab_http_status(404) }
@@ -145,7 +145,7 @@
 
       describe 'GET #users with unknown project' do
         before do
-          get(:users, project_id: 'unknown')
+          get(:users, params: { project_id: 'unknown' })
         end
 
         it { expect(response).to have_gitlab_http_status(404) }
@@ -154,7 +154,7 @@
       describe 'GET #users with inaccessible group' do
         before do
           project.add_guest(user)
-          get(:users, group_id: user.namespace.id)
+          get(:users, params: { group_id: user.namespace.id })
         end
 
         it { expect(response).to have_gitlab_http_status(404) }
@@ -171,7 +171,7 @@
 
       describe 'GET #users with todo filter' do
         it 'gives an array of users' do
-          get :users, todo_filter: true
+          get :users, params: { todo_filter: true }
 
           expect(response.status).to eq 200
           expect(json_response).to be_kind_of(Array)
@@ -186,13 +186,13 @@
         end
 
         it 'includes the author' do
-          get(:users, author_id: non_member.id)
+          get(:users, params: { author_id: non_member.id })
 
           expect(json_response.first["username"]).to eq non_member.username
         end
 
         it 'rejects non existent user ids' do
-          get(:users, author_id: 99999)
+          get(:users, params: { author_id: 99999 })
 
           expect(json_response.collect { |u| u['id'] }).not_to include(99999)
         end
@@ -200,7 +200,7 @@
 
       context 'without authenticating' do
         it 'returns empty result' do
-          get(:users, author_id: non_member.id)
+          get(:users, params: { author_id: non_member.id })
 
           expect(json_response).to be_empty
         end
@@ -213,7 +213,7 @@
       end
 
       it 'skips the user IDs passed' do
-        get(:users, skip_users: [user, user2].map(&:id))
+        get(:users, params: { skip_users: [user, user2].map(&:id) })
 
         response_user_ids = json_response.map { |user| user['id'] }
 
@@ -238,7 +238,7 @@
 
       describe 'GET #projects with project ID' do
         before do
-          get(:projects, project_id: project.id)
+          get(:projects, params: { project_id: project.id })
         end
 
         it 'returns projects' do
@@ -259,7 +259,7 @@
 
       describe 'GET #projects with project ID and search' do
         before do
-          get(:projects, project_id: project.id, search: 'rugged')
+          get(:projects, params: { project_id: project.id, search: 'rugged' })
         end
 
         it 'returns projects' do
@@ -283,7 +283,7 @@
 
       describe 'GET #projects with project ID' do
         before do
-          get(:projects, project_id: project.id)
+          get(:projects, params: { project_id: project.id })
         end
 
         it 'returns projects' do
@@ -305,7 +305,7 @@
 
       describe 'GET #projects with project ID and offset_id' do
         before do
-          get(:projects, project_id: project.id, offset_id: authorized_project.id)
+          get(:projects, params: { project_id: project.id, offset_id: authorized_project.id })
         end
 
         it 'returns projects' do
@@ -324,7 +324,7 @@
 
       describe 'GET #projects with project ID' do
         before do
-          get(:projects, project_id: project.id)
+          get(:projects, params: { project_id: project.id })
         end
 
         it 'returns no projects' do
diff --git a/spec/controllers/boards/issues_controller_spec.rb b/spec/controllers/boards/issues_controller_spec.rb
index 6d0483f00327643ab70117debab631319ca8d6ed..8657fc2ebc0fa5cfc4da1aea32d71c7008c05116 100644
--- a/spec/controllers/boards/issues_controller_spec.rb
+++ b/spec/controllers/boards/issues_controller_spec.rb
@@ -153,7 +153,7 @@ def list_issues(user:, board:, list: nil)
         params[:project_id] = project
       end
 
-      get :index, params.compact
+      get :index, params: params.compact
     end
   end
 
@@ -230,9 +230,11 @@ def list_issues(user:, board:, list: nil)
     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 @@ def create_issue(user:, board:, list:, title:)
     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 16ccf405247242105486a5388a18b537052590fb..700338571684c2f829b6b6198c9b5303230b14f5 100644
--- a/spec/controllers/boards/lists_controller_spec.rb
+++ b/spec/controllers/boards/lists_controller_spec.rb
@@ -46,9 +46,11 @@
     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 @@ def read_board_list(user:, board:)
     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 @@ def move(user:, board:, list:, position:)
     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 @@ def remove_board_list(user:, board:, list:)
     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
diff --git a/spec/controllers/concerns/controller_with_cross_project_access_check_spec.rb b/spec/controllers/concerns/controller_with_cross_project_access_check_spec.rb
index 3c9452cc42a6f17f0df87d21d8ea35869001db0c..9b2d054f4fcda62a7a9a4649052b4e3d293ea08b 100644
--- a/spec/controllers/concerns/controller_with_cross_project_access_check_spec.rb
+++ b/spec/controllers/concerns/controller_with_cross_project_access_check_spec.rb
@@ -70,7 +70,7 @@ def if_condition
       end
 
       it 'correctly renders an action that does not require cross project access' do
-        get :show, id: 'nothing'
+        get :show, params: { id: 'nothing' }
 
         expect(response).to have_gitlab_http_status(200)
       end
@@ -131,13 +131,13 @@ def if_condition
       end
 
       it 'does not skip the check on an action that is not skipped' do
-        get :show, id: 'hello'
+        get :show, params: { id: 'hello' }
 
         expect(response).to have_gitlab_http_status(403)
       end
 
       it 'does not skip the check on an action that was not defined to skip' do
-        get :edit, id: 'hello'
+        get :edit, params: { id: 'hello' }
 
         expect(response).to have_gitlab_http_status(403)
       end
diff --git a/spec/controllers/concerns/group_tree_spec.rb b/spec/controllers/concerns/group_tree_spec.rb
index 503eb416962275ea8fa751af574792e2da78844e..9fe17210d50431396601113ec019acff49e503f9 100644
--- a/spec/controllers/concerns/group_tree_spec.rb
+++ b/spec/controllers/concerns/group_tree_spec.rb
@@ -23,7 +23,7 @@ def index
       other_group = create(:group, name: 'filter')
       other_group.add_owner(user)
 
-      get :index, filter: 'filt', format: :json
+      get :index, params: { filter: 'filt' }, format: :json
 
       expect(assigns(:groups)).to contain_exactly(other_group)
     end
@@ -40,7 +40,7 @@ def index
       it 'contains only the subgroup when a parent was given' do
         subgroup = create(:group, :public, parent: group)
 
-        get :index, parent_id: group.id, format: :json
+        get :index, params: { parent_id: group.id }, format: :json
 
         expect(assigns(:groups)).to contain_exactly(subgroup)
       end
@@ -48,7 +48,7 @@ def index
       it 'allows filtering for subgroups and includes the parents for rendering' do
         subgroup = create(:group, :public, parent: group, name: 'filter')
 
-        get :index, filter: 'filt', format: :json
+        get :index, params: { filter: 'filt' }, format: :json
 
         expect(assigns(:groups)).to contain_exactly(group, subgroup)
       end
@@ -59,7 +59,7 @@ def index
         subgroup.add_developer(user)
         _other_subgroup = create(:group, :private, parent: parent, name: 'filte')
 
-        get :index, filter: 'filt', format: :json
+        get :index, params: { filter: 'filt' }, format: :json
 
         expect(assigns(:groups)).to contain_exactly(parent, subgroup)
       end
@@ -70,7 +70,7 @@ def index
         subgroup = create(:group, :public, parent: group)
         search_result = create(:group, :public, name: 'result', parent: subgroup)
 
-        get :index, filter: 'resu', format: :json
+        get :index, params: { filter: 'resu' }, format: :json
 
         expect(assigns(:groups)).to contain_exactly(group, subgroup, search_result)
       end
@@ -87,7 +87,7 @@ def index
         it 'expands the tree when filtering' do
           subgroup = create(:group, :public, parent: group, name: 'filter')
 
-          get :index, filter: 'filt', format: :json
+          get :index, params: { filter: 'filt' }, format: :json
 
           children_response = json_response.first['children']
 
diff --git a/spec/controllers/concerns/lfs_request_spec.rb b/spec/controllers/concerns/lfs_request_spec.rb
index 76c878ec5d7c189aaccd7474f404a5f5f6385628..7b49d4b6a3a18c71cf2b92d3b3b7604f61d688f9 100644
--- a/spec/controllers/concerns/lfs_request_spec.rb
+++ b/spec/controllers/concerns/lfs_request_spec.rb
@@ -34,7 +34,7 @@ def ci?
 
   describe '#storage_project' do
     it 'assigns the project as storage project' do
-      get :show, id: project.id
+      get :show, params: { id: project.id }
 
       expect(assigns(:storage_project)).to eq(project)
     end
@@ -42,7 +42,7 @@ def ci?
     it 'assigns the source of a forked project' do
       forked_project = fork_project(project)
 
-      get :show, id: forked_project.id
+      get :show, params: { id: forked_project.id }
 
       expect(assigns(:storage_project)).to eq(project)
     end
diff --git a/spec/controllers/dashboard/groups_controller_spec.rb b/spec/controllers/dashboard/groups_controller_spec.rb
index 9068c1a792e5192b736cf5a1124637c234ab5c9d..c8d99f792774c2634953b9f6e48eae61143554ee 100644
--- a/spec/controllers/dashboard/groups_controller_spec.rb
+++ b/spec/controllers/dashboard/groups_controller_spec.rb
@@ -33,7 +33,7 @@
     end
 
     it 'renders only groups the user is a member of when searching hierarchy correctly' do
-      get :index, filter: 'chef', format: :json
+      get :index, params: { filter: 'chef' }, format: :json
 
       expect(response).to have_gitlab_http_status(200)
       all_groups = [top_level_result, top_level_a, sub_level_result_a]
diff --git a/spec/controllers/dashboard/milestones_controller_spec.rb b/spec/controllers/dashboard/milestones_controller_spec.rb
index 278b980b6d8d2cd6f68bd6f0661dce7593da628a..8a8cc14fd4c92e925db20dfc3792ee4dfcd6158d 100644
--- a/spec/controllers/dashboard/milestones_controller_spec.rb
+++ b/spec/controllers/dashboard/milestones_controller_spec.rb
@@ -34,7 +34,7 @@
     render_views
 
     def view_milestone
-      get :show, id: milestone.safe_title, title: milestone.title
+      get :show, params: { id: milestone.safe_title, title: milestone.title }
     end
 
     it 'shows milestone page' do
diff --git a/spec/controllers/dashboard/todos_controller_spec.rb b/spec/controllers/dashboard/todos_controller_spec.rb
index e2c799f52056ee7611f273a04baa46d97da1d105..d88beaff0e130d6084003d87c52e8ed2893e8929 100644
--- a/spec/controllers/dashboard/todos_controller_spec.rb
+++ b/spec/controllers/dashboard/todos_controller_spec.rb
@@ -16,19 +16,19 @@
       it 'renders 404 when user does not have read access on given project' do
         unauthorized_project = create(:project, :private)
 
-        get :index, project_id: unauthorized_project.id
+        get :index, params: { project_id: unauthorized_project.id }
 
         expect(response).to have_gitlab_http_status(404)
       end
 
       it 'renders 404 when given project does not exists' do
-        get :index, project_id: 999
+        get :index, params: { project_id: 999 }
 
         expect(response).to have_gitlab_http_status(404)
       end
 
       it 'renders 200 when filtering for "any project" todos' do
-        get :index, project_id: ''
+        get :index, params: { project_id: '' }
 
         expect(response).to have_gitlab_http_status(200)
       end
@@ -36,7 +36,7 @@
       it 'renders 200 when user has access on given project' do
         authorized_project = create(:project, :public)
 
-        get :index, project_id: authorized_project.id
+        get :index, params: { project_id: authorized_project.id }
 
         expect(response).to have_gitlab_http_status(200)
       end
@@ -46,7 +46,7 @@
       it 'renders 404 when user does not have read access on given group' do
         unauthorized_group = create(:group, :private)
 
-        get :index, group_id: unauthorized_group.id
+        get :index, params: { group_id: unauthorized_group.id }
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -62,13 +62,13 @@
       end
 
       it 'redirects to last_page if page number is larger than number of pages' do
-        get :index, page: (last_page + 1).to_param
+        get :index, params: { page: (last_page + 1).to_param }
 
         expect(response).to redirect_to(dashboard_todos_path(page: last_page))
       end
 
       it 'goes to the correct page' do
-        get :index, page: last_page
+        get :index, params: { page: last_page }
 
         expect(assigns(:todos).current_page).to eq(last_page)
         expect(response).to have_gitlab_http_status(200)
@@ -76,7 +76,7 @@
 
       it 'does not redirect to external sites when provided a host field' do
         external_host = "www.example.com"
-        get :index, page: (last_page + 1).to_param, host: external_host
+        get :index, params: { page: (last_page + 1).to_param, host: external_host }
 
         expect(response).to redirect_to(dashboard_todos_path(page: last_page))
       end
@@ -87,7 +87,7 @@
 
           expect(user).to receive(:todos_pending_count).and_call_original
 
-          get :index, page: (last_page + 1).to_param, sort: :created_asc
+          get :index, params: { page: (last_page + 1).to_param, sort: :created_asc }
 
           expect(response).to redirect_to(dashboard_todos_path(page: last_page, sort: :created_asc))
         end
@@ -99,7 +99,7 @@
 
           expect(user).not_to receive(:todos_pending_count)
 
-          get :index, page: (last_page + 1).to_param, project_id: project.id
+          get :index, params: { page: (last_page + 1).to_param, project_id: project.id }
 
           expect(response).to redirect_to(dashboard_todos_path(page: last_page, project_id: project.id))
         end
@@ -111,7 +111,7 @@
     let(:todo) { create(:todo, :done, user: user, project: project, author: author) }
 
     it 'restores the todo to pending state' do
-      patch :restore, id: todo.id
+      patch :restore, params: { id: todo.id }
 
       expect(todo.reload).to be_pending
       expect(response).to have_gitlab_http_status(200)
@@ -123,7 +123,7 @@
     let(:todos) { create_list(:todo, 2, :done, user: user, project: project, author: author) }
 
     it 'restores the todos to pending state' do
-      patch :bulk_restore, ids: todos.map(&:id)
+      patch :bulk_restore, params: { ids: todos.map(&:id) }
 
       todos.each do |todo|
         expect(todo.reload).to be_pending
diff --git a/spec/controllers/explore/projects_controller_spec.rb b/spec/controllers/explore/projects_controller_spec.rb
index 2845f258f6fb973d18d0e9482521ccaa4498a56f..d57367e931ec798df8156b96f5e101a026f742a7 100644
--- a/spec/controllers/explore/projects_controller_spec.rb
+++ b/spec/controllers/explore/projects_controller_spec.rb
@@ -12,13 +12,13 @@
       end
 
       it 'sorts by last updated' do
-        get :trending, sort: 'updated_desc'
+        get :trending, params: { sort: 'updated_desc' }
 
         expect(assigns(:projects)).to eq [project2, project1]
       end
 
       it 'sorts by oldest updated' do
-        get :trending, sort: 'updated_asc'
+        get :trending, params: { sort: 'updated_asc' }
 
         expect(assigns(:projects)).to eq [project1, project2]
       end
diff --git a/spec/controllers/google_api/authorizations_controller_spec.rb b/spec/controllers/google_api/authorizations_controller_spec.rb
index 80d553f0f343f2e983fe81c4668116a90d12cf6a..1e8e82da4f3183a2f1f6723d043645e8f2ab310b 100644
--- a/spec/controllers/google_api/authorizations_controller_spec.rb
+++ b/spec/controllers/google_api/authorizations_controller_spec.rb
@@ -6,7 +6,7 @@
     let(:token) { 'token' }
     let(:expires_at) { 1.hour.since.strftime('%s') }
 
-    subject { get :callback, code: 'xxx', state: @state }
+    subject { get :callback, params: { code: 'xxx', state: @state } }
 
     before do
       sign_in(user)
diff --git a/spec/controllers/graphql_controller_spec.rb b/spec/controllers/graphql_controller_spec.rb
index 949ad532365329676204625906e737ee953b5c9d..a0f40874db1a80a910bbe3de679fd0bf9eac0bc4 100644
--- a/spec/controllers/graphql_controller_spec.rb
+++ b/spec/controllers/graphql_controller_spec.rb
@@ -103,7 +103,7 @@ def run_test_query!(variables: { 'text' => 'test success' }, private_token: nil)
       }
     QUERY
 
-    post :execute, query: query, operationName: 'Echo', variables: variables, private_token: private_token
+    post :execute, params: { query: query, operationName: 'Echo', variables: variables, private_token: private_token }
   end
 
   def query_response
diff --git a/spec/controllers/groups/avatars_controller_spec.rb b/spec/controllers/groups/avatars_controller_spec.rb
index 7feecd0c3809c485504b669e91e1a5f6b0d059dd..772d1d0c1dd2933994a139cd2e6ac2fc84cb90fe 100644
--- a/spec/controllers/groups/avatars_controller_spec.rb
+++ b/spec/controllers/groups/avatars_controller_spec.rb
@@ -10,7 +10,7 @@
   end
 
   it 'removes avatar from DB calling destroy' do
-    delete :destroy, group_id: group.path
+    delete :destroy, params: { group_id: group.path }
     @group = assigns(:group)
     expect(@group.avatar.present?).to be_falsey
     expect(@group).to be_valid
diff --git a/spec/controllers/groups/boards_controller_spec.rb b/spec/controllers/groups/boards_controller_spec.rb
index 3edfa5fd1b4c509681bbb5768b9fd88f4fe97cca..d57479673c3f7b78c73d15a76b073aa30d33e353 100644
--- a/spec/controllers/groups/boards_controller_spec.rb
+++ b/spec/controllers/groups/boards_controller_spec.rb
@@ -105,7 +105,7 @@
     end
 
     def list_boards(format: :html)
-      get :index, group_id: group, format: format
+      get :index, params: { group_id: group }, format: format
     end
   end
 
@@ -183,8 +183,10 @@ def list_boards(format: :html)
     end
 
     def read_board(board:, format: :html)
-      get :show, group_id: group,
-                 id: board.to_param,
+      get :show, params: {
+                   group_id: group,
+                   id: board.to_param
+                 },
                  format: format
     end
   end
diff --git a/spec/controllers/groups/children_controller_spec.rb b/spec/controllers/groups/children_controller_spec.rb
index 22d3076c2690edc1b744d10e34a52fc42243a38b..4d5bb1488abd30de6e68c52de2add9c7eaaab91f 100644
--- a/spec/controllers/groups/children_controller_spec.rb
+++ b/spec/controllers/groups/children_controller_spec.rb
@@ -16,7 +16,7 @@
         end
 
         it 'shows all children' do
-          get :index, group_id: group.to_param, format: :json
+          get :index, params: { group_id: group.to_param }, format: :json
 
           expect(assigns(:children)).to contain_exactly(public_project, private_project)
         end
@@ -26,7 +26,7 @@
             group_member.destroy!
             private_project.add_guest(user)
 
-            get :index, group_id: group.to_param, format: :json
+            get :index, params: { group_id: group.to_param }, format: :json
 
             expect(assigns(:children)).to contain_exactly(public_project, private_project)
           end
@@ -35,7 +35,7 @@
 
       context 'as a guest' do
         it 'shows the public children' do
-          get :index, group_id: group.to_param, format: :json
+          get :index, params: { group_id: group.to_param }, format: :json
 
           expect(assigns(:children)).to contain_exactly(public_project)
         end
@@ -54,7 +54,7 @@
         end
 
         it 'shows all children' do
-          get :index, group_id: group.to_param, format: :json
+          get :index, params: { group_id: group.to_param }, format: :json
 
           expect(assigns(:children)).to contain_exactly(public_subgroup, private_subgroup, public_project, private_project)
         end
@@ -65,7 +65,7 @@
             private_subgroup.add_guest(user)
             private_project.add_guest(user)
 
-            get :index, group_id: group.to_param, format: :json
+            get :index, params: { group_id: group.to_param }, format: :json
 
             expect(assigns(:children)).to contain_exactly(public_subgroup, private_subgroup, public_project, private_project)
           end
@@ -74,7 +74,7 @@
 
       context 'as a guest' do
         it 'shows the public children' do
-          get :index, group_id: group.to_param, format: :json
+          get :index, params: { group_id: group.to_param }, format: :json
 
           expect(assigns(:children)).to contain_exactly(public_subgroup, public_project)
         end
@@ -84,7 +84,7 @@
         it 'expands the tree for matching projects' do
           project = create(:project, :public, namespace: public_subgroup, name: 'filterme')
 
-          get :index, group_id: group.to_param, filter: 'filter', format: :json
+          get :index, params: { group_id: group.to_param, filter: 'filter' }, format: :json
 
           group_json = json_response.first
           project_json = group_json['children'].first
@@ -96,7 +96,7 @@
         it 'expands the tree for matching subgroups' do
           matched_group = create(:group, :public, parent: public_subgroup, name: 'filterme')
 
-          get :index, group_id: group.to_param, filter: 'filter', format: :json
+          get :index, params: { group_id: group.to_param, filter: 'filter' }, format: :json
 
           group_json = json_response.first
           matched_group_json = group_json['children'].first
@@ -113,7 +113,7 @@
           l3_subgroup = create(:group, :public,  parent: l2_subgroup, path: 'wifi-group')
           matched_project_2 = create(:project, :public, namespace: l3_subgroup, name: 'mobile')
 
-          get :index, group_id: group.to_param, filter: 'mobile', format: :json
+          get :index, params: { group_id: group.to_param, filter: 'mobile' }, format: :json
 
           shared_group_json = json_response.first
           expect(shared_group_json['id']).to eq(shared_subgroup.id)
@@ -136,7 +136,7 @@
           l2_subgroup = create(:group, :public, parent: subgroup)
           create(:project, :public, namespace: l2_subgroup, name: 'test')
 
-          get :index, group_id: subgroup.to_param, filter: 'test', format: :json
+          get :index, params: { group_id: subgroup.to_param, filter: 'test' }, format: :json
 
           expect(response).to have_http_status(200)
         end
@@ -144,7 +144,7 @@
         it 'returns an array with one element when only one result is matched' do
           create(:project, :public, namespace: group, name: 'match')
 
-          get :index, group_id: group.to_param, filter: 'match', format: :json
+          get :index, params: { group_id: group.to_param, filter: 'match' }, format: :json
 
           expect(json_response).to be_kind_of(Array)
           expect(json_response.size).to eq(1)
@@ -155,7 +155,7 @@
           l2_subgroup = create(:group, :public, parent: subgroup)
           create(:project, :public, namespace: l2_subgroup, name: 'no-match')
 
-          get :index, group_id: subgroup.to_param, filter: 'test', format: :json
+          get :index, params: { group_id: subgroup.to_param, filter: 'test' }, format: :json
 
           expect(json_response).to eq([])
         end
@@ -179,7 +179,7 @@
           end
           group_to_nest.update!(parent: subgroup)
 
-          get :index, group_id: group.to_param, filter: 'filter', per_page: 3, format: :json
+          get :index, params: { group_id: group.to_param, filter: 'filter', per_page: 3 }, format: :json
 
           expect(response).to have_gitlab_http_status(200)
         end
@@ -187,7 +187,7 @@
         it 'includes pagination headers' do
           2.times { |i| create(:group, :public, parent: public_subgroup, name: "filterme#{i}") }
 
-          get :index, group_id: group.to_param, filter: 'filter', per_page: 1, format: :json
+          get :index, params: { group_id: group.to_param, filter: 'filter', per_page: 1 }, format: :json
 
           expect(response).to include_pagination_headers
         end
@@ -203,7 +203,7 @@
         let(:expected_queries_per_project) { 0 }
 
         def get_list
-          get :index, group_id: group.to_param, format: :json
+          get :index, params: { group_id: group.to_param }, format: :json
         end
 
         it 'queries the expected amount for a group row' do
@@ -227,7 +227,7 @@ def get_list
           let(:extra_queries_for_hierarchies) { 1 }
 
           def get_filtered_list
-            get :index, group_id: group.to_param, filter: 'filter', format: :json
+            get :index, params: { group_id: group.to_param, filter: 'filter' }, format: :json
           end
 
           it 'queries the expected amount when nested rows are increased for a group' do
@@ -276,13 +276,13 @@ def get_filtered_list
         let!(:first_page_projects) { create_list(:project, per_page, :public, namespace: group ) }
 
         it 'has projects on the first page' do
-          get :index, group_id: group.to_param, sort: 'id_desc', format: :json
+          get :index, params: { group_id: group.to_param, sort: 'id_desc' }, format: :json
 
           expect(assigns(:children)).to contain_exactly(*first_page_projects)
         end
 
         it 'has projects on the second page' do
-          get :index, group_id: group.to_param, sort: 'id_desc', page: 2, format: :json
+          get :index, params: { group_id: group.to_param, sort: 'id_desc', page: 2 }, format: :json
 
           expect(assigns(:children)).to contain_exactly(other_project)
         end
@@ -294,13 +294,13 @@ def get_filtered_list
         let!(:next_page_projects) { create_list(:project, per_page, :public, namespace: group) }
 
         it 'contains all subgroups' do
-          get :index, group_id: group.to_param, sort: 'id_asc', format: :json
+          get :index, params: { group_id: group.to_param, sort: 'id_asc' }, format: :json
 
           expect(assigns(:children)).to contain_exactly(*first_page_subgroups)
         end
 
         it 'contains the project and group on the second page' do
-          get :index, group_id: group.to_param, sort: 'id_asc', page: 2, format: :json
+          get :index, params: { group_id: group.to_param, sort: 'id_asc', page: 2 }, format: :json
 
           expect(assigns(:children)).to contain_exactly(other_subgroup, *next_page_projects.take(per_page - 1))
         end
@@ -310,7 +310,7 @@ def get_filtered_list
           let!(:first_page_projects) { create_list(:project, per_page, :public, namespace: group) }
 
           it 'correctly calculates the counts' do
-            get :index, group_id: group.to_param, sort: 'id_asc', page: 2, format: :json
+            get :index, params: { group_id: group.to_param, sort: 'id_asc', page: 2 }, format: :json
 
             expect(response).to have_gitlab_http_status(200)
           end
diff --git a/spec/controllers/groups/clusters/applications_controller_spec.rb b/spec/controllers/groups/clusters/applications_controller_spec.rb
index 68a798542b692bdf488069136713fed9888c862f..dd5263b077c6f7f03ccd88d37ce54a9c4ca7b6fc 100644
--- a/spec/controllers/groups/clusters/applications_controller_spec.rb
+++ b/spec/controllers/groups/clusters/applications_controller_spec.rb
@@ -81,7 +81,7 @@ def current_application
     end
 
     def go
-      post :create, params.merge(group_id: group)
+      post :create, params: params.merge(group_id: group)
     end
   end
 end
diff --git a/spec/controllers/groups/clusters_controller_spec.rb b/spec/controllers/groups/clusters_controller_spec.rb
index 6e130f830a287c94486b0a4af60d45c3df63ce19..0f28499194e453b73e6425baf448608f14149b30 100644
--- a/spec/controllers/groups/clusters_controller_spec.rb
+++ b/spec/controllers/groups/clusters_controller_spec.rb
@@ -17,7 +17,7 @@
 
   describe 'GET index' do
     def go(params = {})
-      get :index, params.reverse_merge(group_id: group)
+      get :index, params: params.reverse_merge(group_id: group)
     end
 
     context 'when feature flag is not enabled' do
@@ -104,7 +104,7 @@ def go(params = {})
 
   describe 'GET new' do
     def go
-      get :new, group_id: group
+      get :new, params: { group_id: group }
     end
 
     describe 'functionality for new cluster' do
@@ -198,7 +198,7 @@ def go
     end
 
     def go
-      post :create_gcp, params.merge(group_id: group)
+      post :create_gcp, params: params.merge(group_id: group)
     end
 
     describe 'functionality' do
@@ -287,7 +287,7 @@ def go
     end
 
     def go
-      post :create_user, params.merge(group_id: group)
+      post :create_user, params: params.merge(group_id: group)
     end
 
     describe 'functionality' do
@@ -353,8 +353,10 @@ def go
 
     def go
       get :cluster_status,
-        group_id: group.to_param,
-        id: cluster,
+        params: {
+          group_id: group.to_param,
+          id: cluster
+        },
         format: :json
     end
 
@@ -390,8 +392,10 @@ def go
 
     def go
       get :show,
-        group_id: group,
-        id: cluster
+        params: {
+          group_id: group,
+          id: cluster
+        }
     end
 
     describe 'functionality' do
@@ -417,7 +421,7 @@ def go
 
   describe 'PUT update' do
     def go(format: :html)
-      put :update, params.merge(
+      put :update, params: params.merge(
         group_id: group.to_param,
         id: cluster,
         format: format
@@ -505,8 +509,10 @@ def go(format: :html)
 
     def go
       delete :destroy,
-        group_id: group,
-        id: cluster
+        params: {
+          group_id: group,
+          id: cluster
+        }
     end
 
     describe 'functionality' do
diff --git a/spec/controllers/groups/group_members_controller_spec.rb b/spec/controllers/groups/group_members_controller_spec.rb
index a0ed76d9ffc9f03b61d0a6710436fd231e324775..9a4dae95e101fe002faf91e9545aeef7abda9460 100644
--- a/spec/controllers/groups/group_members_controller_spec.rb
+++ b/spec/controllers/groups/group_members_controller_spec.rb
@@ -6,7 +6,7 @@
 
   describe 'GET index' do
     it 'renders index with 200 status code' do
-      get :index, group_id: group
+      get :index, params: { group_id: group }
 
       expect(response).to have_gitlab_http_status(200)
       expect(response).to render_template(:index)
@@ -26,9 +26,11 @@
       end
 
       it 'returns 403' do
-        post :create, group_id: group,
-                      user_ids: group_user.id,
-                      access_level: Gitlab::Access::GUEST
+        post :create, params: {
+                        group_id: group,
+                        user_ids: group_user.id,
+                        access_level: Gitlab::Access::GUEST
+                      }
 
         expect(response).to have_gitlab_http_status(403)
         expect(group.users).not_to include group_user
@@ -41,9 +43,11 @@
       end
 
       it 'adds user to members' do
-        post :create, group_id: group,
-                      user_ids: group_user.id,
-                      access_level: Gitlab::Access::GUEST
+        post :create, params: {
+                        group_id: group,
+                        user_ids: group_user.id,
+                        access_level: Gitlab::Access::GUEST
+                      }
 
         expect(response).to set_flash.to 'Users were successfully added.'
         expect(response).to redirect_to(group_group_members_path(group))
@@ -59,9 +63,11 @@
       end
 
       it 'adds no user to members' do
-        post :create, group_id: group,
-                      user_ids: '',
-                      access_level: Gitlab::Access::GUEST
+        post :create, params: {
+                        group_id: group,
+                        user_ids: '',
+                        access_level: Gitlab::Access::GUEST
+                      }
 
         expect(response).to set_flash.to 'No users specified.'
         expect(response).to redirect_to(group_group_members_path(group))
@@ -98,7 +104,7 @@
 
     context 'when member is not found' do
       it 'returns 403' do
-        delete :destroy, group_id: group, id: 42
+        delete :destroy, params: { group_id: group, id: 42 }
 
         expect(response).to have_gitlab_http_status(403)
       end
@@ -111,7 +117,7 @@
         end
 
         it 'returns 403' do
-          delete :destroy, group_id: group, id: member
+          delete :destroy, params: { group_id: group, id: member }
 
           expect(response).to have_gitlab_http_status(403)
           expect(group.members).to include member
@@ -124,7 +130,7 @@
         end
 
         it '[HTML] removes user from members' do
-          delete :destroy, group_id: group, id: member
+          delete :destroy, params: { group_id: group, id: member }
 
           expect(response).to set_flash.to 'User was successfully removed from group.'
           expect(response).to redirect_to(group_group_members_path(group))
@@ -148,7 +154,7 @@
 
     context 'when member is not found' do
       it 'returns 404' do
-        delete :leave, group_id: group
+        delete :leave, params: { group_id: group }
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -161,7 +167,7 @@
         end
 
         it 'removes user from members' do
-          delete :leave, group_id: group
+          delete :leave, params: { group_id: group }
 
           expect(response).to set_flash.to "You left the \"#{group.name}\" group."
           expect(response).to redirect_to(dashboard_groups_path)
@@ -169,7 +175,7 @@
         end
 
         it 'supports json request' do
-          delete :leave, group_id: group, format: :json
+          delete :leave, params: { group_id: group }, format: :json
 
           expect(response).to have_gitlab_http_status(200)
           expect(json_response['notice']).to eq "You left the \"#{group.name}\" group."
@@ -186,7 +192,7 @@
         end
 
         it 'cannot removes himself from the group' do
-          delete :leave, group_id: group
+          delete :leave, params: { group_id: group }
 
           expect(response).to have_gitlab_http_status(403)
         end
@@ -202,7 +208,7 @@
         end
 
         it 'removes user from members' do
-          delete :leave, group_id: group
+          delete :leave, params: { group_id: group }
 
           expect(response).to set_flash.to 'Your access request to the group has been withdrawn.'
           expect(response).to redirect_to(group_path(group))
@@ -223,7 +229,7 @@
     end
 
     it 'creates a new GroupMember that is not a team member' do
-      post :request_access, group_id: group
+      post :request_access, params: { group_id: group }
 
       expect(response).to set_flash.to 'Your request for access has been queued for review.'
       expect(response).to redirect_to(group_path(group))
@@ -241,7 +247,7 @@
 
     context 'when member is not found' do
       it 'returns 403' do
-        post :approve_access_request, group_id: group, id: 42
+        post :approve_access_request, params: { group_id: group, id: 42 }
 
         expect(response).to have_gitlab_http_status(403)
       end
@@ -254,7 +260,7 @@
         end
 
         it 'returns 403' do
-          post :approve_access_request, group_id: group, id: member
+          post :approve_access_request, params: { group_id: group, id: member }
 
           expect(response).to have_gitlab_http_status(403)
           expect(group.members).not_to include member
@@ -267,7 +273,7 @@
         end
 
         it 'adds user to members' do
-          post :approve_access_request, group_id: group, id: member
+          post :approve_access_request, params: { group_id: group, id: member }
 
           expect(response).to redirect_to(group_group_members_path(group))
           expect(group.members).to include member
diff --git a/spec/controllers/groups/labels_controller_spec.rb b/spec/controllers/groups/labels_controller_spec.rb
index 185b6b4ce5724d2e9bcdfb3930d7e4c459f79d30..fa664a29066e89a998093df71fb465a5b65667ff 100644
--- a/spec/controllers/groups/labels_controller_spec.rb
+++ b/spec/controllers/groups/labels_controller_spec.rb
@@ -16,7 +16,7 @@
     set(:group_label_1) { create(:group_label, group: group, title: 'group_label_1') }
 
     it 'returns group and project labels by default' do
-      get :index, group_id: group, format: :json
+      get :index, params: { group_id: group }, format: :json
 
       label_ids = json_response.map {|label| label['title']}
       expect(label_ids).to match_array([label_1.title, group_label_1.title])
@@ -31,7 +31,7 @@
       end
 
       it 'returns ancestor group labels', :nested_groups do
-        get :index, group_id: subgroup, include_ancestor_groups: true, only_group_labels: true, format: :json
+        get :index, params: { group_id: subgroup, include_ancestor_groups: true, only_group_labels: true }, format: :json
 
         label_ids = json_response.map {|label| label['title']}
         expect(label_ids).to match_array([group_label_1.title, subgroup_label_1.title])
@@ -43,7 +43,7 @@
     it 'allows user to toggle subscription on group labels' do
       label = create(:group_label, group: group)
 
-      post :toggle_subscription, group_id: group.to_param, id: label.to_param
+      post :toggle_subscription, params: { group_id: group.to_param, id: label.to_param }
 
       expect(response).to have_gitlab_http_status(200)
     end
diff --git a/spec/controllers/groups/milestones_controller_spec.rb b/spec/controllers/groups/milestones_controller_spec.rb
index 42723bb3820d48f6e6bdb23ec237ec285a42b5e8..b8e1e08cff7aeac1bdfb63ff219d6784b932807e 100644
--- a/spec/controllers/groups/milestones_controller_spec.rb
+++ b/spec/controllers/groups/milestones_controller_spec.rb
@@ -33,7 +33,7 @@
 
   describe '#index' do
     it 'shows group milestones page' do
-      get :index, group_id: group.to_param
+      get :index, params: { group_id: group.to_param }
 
       expect(response).to have_gitlab_http_status(200)
     end
@@ -44,7 +44,7 @@
       let!(:legacy_milestone2) { create(:milestone, project: project2, title: 'legacy') }
 
       it 'lists legacy group milestones and group milestones' do
-        get :index, group_id: group.to_param, format: :json
+        get :index, params: { group_id: group.to_param }, format: :json
 
         milestones = JSON.parse(response.body)
 
@@ -67,7 +67,7 @@
         expect(GlobalMilestone).to receive(:build)
         expect(Milestone).not_to receive(:find_by_iid)
 
-        get :show, group_id: group.to_param, id: title, title: milestone1.safe_title
+        get :show, params: { group_id: group.to_param, id: title, title: milestone1.safe_title }
       end
     end
 
@@ -76,7 +76,7 @@
         expect(GlobalMilestone).not_to receive(:build)
         expect(Milestone).to receive(:find_by_iid)
 
-        get :show, group_id: group.to_param, id: group_milestone.id
+        get :show, params: { group_id: group.to_param, id: group_milestone.id }
       end
     end
   end
@@ -86,8 +86,10 @@
   describe "#create" do
     it "creates group milestone with Chinese title" do
       post :create,
-           group_id: group.to_param,
-           milestone: milestone_params
+           params: {
+             group_id: group.to_param,
+             milestone: milestone_params
+           }
 
       milestone = Milestone.find_by_title(title)
 
@@ -105,9 +107,11 @@
       milestone_params[:title] = "title changed"
 
       put :update,
-           id: milestone.iid,
-           group_id: group.to_param,
-           milestone: milestone_params
+           params: {
+             id: milestone.iid,
+             group_id: group.to_param,
+             milestone: milestone_params
+           }
 
       milestone.reload
       expect(response).to redirect_to(group_milestone_path(group, milestone.iid))
@@ -124,10 +128,12 @@
         milestone_params[:state_event] = "close"
 
         put :update,
-             id: milestone1.title.to_slug.to_s,
-             group_id: group.to_param,
-             milestone: milestone_params,
-             title: milestone1.title
+             params: {
+               id: milestone1.title.to_slug.to_s,
+               group_id: group.to_param,
+               milestone: milestone_params,
+               title: milestone1.title
+             }
 
         expect(response).to redirect_to(group_milestone_path(group, milestone1.safe_title, title: milestone1.title))
 
@@ -145,7 +151,7 @@
     let(:milestone) { create(:milestone, group: group) }
 
     it "removes milestone" do
-      delete :destroy, group_id: group.to_param, id: milestone.iid, format: :js
+      delete :destroy, params: { group_id: group.to_param, id: milestone.iid }, format: :js
 
       expect(response).to be_success
       expect { Milestone.find(milestone.id) }.to raise_exception(ActiveRecord::RecordNotFound)
@@ -162,7 +168,7 @@
         context 'non-show path' do
           context 'with exactly matching casing' do
             it 'does not redirect' do
-              get :index, group_id: group.to_param
+              get :index, params: { group_id: group.to_param }
 
               expect(response).not_to have_gitlab_http_status(301)
             end
@@ -170,7 +176,7 @@
 
           context 'with different casing' do
             it 'redirects to the correct casing' do
-              get :index, group_id: group.to_param.upcase
+              get :index, params: { group_id: group.to_param.upcase }
 
               expect(response).to redirect_to(group_milestones_path(group.to_param))
               expect(controller).not_to set_flash[:notice]
@@ -181,7 +187,7 @@
         context 'show path' do
           context 'with exactly matching casing' do
             it 'does not redirect' do
-              get :show, group_id: group.to_param, id: title
+              get :show, params: { group_id: group.to_param, id: title }
 
               expect(response).not_to have_gitlab_http_status(301)
             end
@@ -189,7 +195,7 @@
 
           context 'with different casing' do
             it 'redirects to the correct casing' do
-              get :show, group_id: group.to_param.upcase, id: title
+              get :show, params: { group_id: group.to_param.upcase, id: title }
 
               expect(response).to redirect_to(group_milestone_path(group.to_param, title))
               expect(controller).not_to set_flash[:notice]
@@ -202,7 +208,7 @@
         let(:redirect_route) { group.redirect_routes.create(path: 'old-path') }
 
         it 'redirects to the canonical path' do
-          get :merge_requests, group_id: redirect_route.path, id: title
+          get :merge_requests, params: { group_id: redirect_route.path, id: title }
 
           expect(response).to redirect_to(merge_requests_group_milestone_path(group.to_param, title))
           expect(controller).to set_flash[:notice].to(group_moved_message(redirect_route, group))
@@ -212,7 +218,7 @@
           let(:redirect_route) { group.redirect_routes.create(path: 'http') }
 
           it 'does not modify the requested host' do
-            get :merge_requests, group_id: redirect_route.path, id: title
+            get :merge_requests, params: { group_id: redirect_route.path, id: title }
 
             expect(response).to redirect_to(merge_requests_group_milestone_path(group.to_param, title))
             expect(controller).to set_flash[:notice].to(group_moved_message(redirect_route, group))
@@ -224,7 +230,7 @@
           let(:redirect_route) { group.redirect_routes.create(path: 'oups') }
 
           it 'does not modify the /groups part of the path' do
-            get :merge_requests, group_id: redirect_route.path, id: title
+            get :merge_requests, params: { group_id: redirect_route.path, id: title }
 
             expect(response).to redirect_to(merge_requests_group_milestone_path(group.to_param, title))
             expect(controller).to set_flash[:notice].to(group_moved_message(redirect_route, group))
@@ -236,7 +242,7 @@
           let(:redirect_route) { group.redirect_routes.create(path: 'oups/oup') }
 
           it 'does not modify the /groups part of the path' do
-            get :merge_requests, group_id: redirect_route.path, id: title
+            get :merge_requests, params: { group_id: redirect_route.path, id: title }
 
             expect(response).to redirect_to(merge_requests_group_milestone_path(group.to_param, title))
             expect(controller).to set_flash[:notice].to(group_moved_message(redirect_route, group))
@@ -250,16 +256,20 @@
     context 'when requesting the canonical path with different casing' do
       it 'does not 404' do
         post :create,
-             group_id: group.to_param,
-             milestone: { title: title }
+             params: {
+               group_id: group.to_param,
+               milestone: { title: title }
+             }
 
         expect(response).not_to have_gitlab_http_status(404)
       end
 
       it 'does not redirect to the correct casing' do
         post :create,
-             group_id: group.to_param,
-             milestone: { title: title }
+             params: {
+               group_id: group.to_param,
+               milestone: { title: title }
+             }
 
         expect(response).not_to have_gitlab_http_status(301)
       end
@@ -270,8 +280,10 @@
 
       it 'returns not found' do
         post :create,
-             group_id: redirect_route.path,
-             milestone: { title: title }
+             params: {
+               group_id: redirect_route.path,
+               milestone: { title: title }
+             }
 
         expect(response).to have_gitlab_http_status(404)
       end
diff --git a/spec/controllers/groups/runners_controller_spec.rb b/spec/controllers/groups/runners_controller_spec.rb
index 598fb84552f74cf70ab8ac306abe80c1f12e0c1e..469459bfc02911b43d9ff0918d60f8f120181b40 100644
--- a/spec/controllers/groups/runners_controller_spec.rb
+++ b/spec/controllers/groups/runners_controller_spec.rb
@@ -22,7 +22,7 @@
       new_desc = runner.description.swapcase
 
       expect do
-        post :update, params.merge(runner: { description: new_desc } )
+        post :update, params: params.merge(runner: { description: new_desc } )
       end.to change { runner.ensure_runner_queue_value }
 
       runner.reload
@@ -34,7 +34,7 @@
 
   describe '#destroy' do
     it 'destroys the runner' do
-      delete :destroy, params
+      delete :destroy, params: params
 
       expect(response).to have_gitlab_http_status(302)
       expect(Ci::Runner.find_by(id: runner.id)).to be_nil
@@ -46,7 +46,7 @@
       runner.update(active: false)
 
       expect do
-        post :resume, params
+        post :resume, params: params
       end.to change { runner.ensure_runner_queue_value }
 
       runner.reload
@@ -61,7 +61,7 @@
       runner.update(active: true)
 
       expect do
-        post :pause, params
+        post :pause, params: params
       end.to change { runner.ensure_runner_queue_value }
 
       runner.reload
diff --git a/spec/controllers/groups/settings/ci_cd_controller_spec.rb b/spec/controllers/groups/settings/ci_cd_controller_spec.rb
index 06ccace8242a4dea62a5985d8c0ab5a38e1b60f9..b7f04f732b9226150059c1cfd2705c13e027f90a 100644
--- a/spec/controllers/groups/settings/ci_cd_controller_spec.rb
+++ b/spec/controllers/groups/settings/ci_cd_controller_spec.rb
@@ -11,7 +11,7 @@
 
   describe 'GET #show' do
     it 'renders show with 200 status code' do
-      get :show, group_id: group
+      get :show, params: { group_id: group }
 
       expect(response).to have_gitlab_http_status(200)
       expect(response).to render_template(:show)
@@ -19,7 +19,7 @@
   end
 
   describe 'PUT #reset_registration_token' do
-    subject { put :reset_registration_token, group_id: group }
+    subject { put :reset_registration_token, params: { group_id: group } }
 
     it 'resets runner registration token' do
       expect { subject }.to change { group.reload.runners_token }
diff --git a/spec/controllers/groups/shared_projects_controller_spec.rb b/spec/controllers/groups/shared_projects_controller_spec.rb
index 003c8c262e76f2121b628f8996b6a6dc7b53b238..dab7700cf64ba7d169a574ef1d53d4306d692cda 100644
--- a/spec/controllers/groups/shared_projects_controller_spec.rb
+++ b/spec/controllers/groups/shared_projects_controller_spec.rb
@@ -2,7 +2,7 @@
 
 describe Groups::SharedProjectsController do
   def get_shared_projects(params = {})
-    get :index, params.reverse_merge(format: :json, group_id: group.full_path)
+    get :index, params: params.reverse_merge(format: :json, group_id: group.full_path)
   end
 
   def share_project(project)
diff --git a/spec/controllers/groups/uploads_controller_spec.rb b/spec/controllers/groups/uploads_controller_spec.rb
index 5a7281ed70444abfb6816864d76e8520e8c548c7..0104ba827da17e46065850013d5c359f9d7ad882 100644
--- a/spec/controllers/groups/uploads_controller_spec.rb
+++ b/spec/controllers/groups/uploads_controller_spec.rb
@@ -15,6 +15,6 @@
   def post_authorize(verified: true)
     request.headers.merge!(workhorse_internal_api_request_header) if verified
 
-    post :authorize, group_id: model.full_path, format: :json
+    post :authorize, params: { group_id: model.full_path }, format: :json
   end
 end
diff --git a/spec/controllers/groups/variables_controller_spec.rb b/spec/controllers/groups/variables_controller_spec.rb
index e5ac5634f95c3ed7872dc6183f533f634adee6ef..29ec35883161486e1b9cc90ef077e542997b7e21 100644
--- a/spec/controllers/groups/variables_controller_spec.rb
+++ b/spec/controllers/groups/variables_controller_spec.rb
@@ -13,7 +13,7 @@
     let!(:variable) { create(:ci_group_variable, group: group) }
 
     subject do
-      get :show, group_id: group, format: :json
+      get :show, params: { group_id: group }, format: :json
     end
 
     include_examples 'GET #show lists all variables'
@@ -25,8 +25,10 @@
 
     subject do
       patch :update,
-        group_id: group,
-        variables_attributes: variables_attributes,
+        params: {
+          group_id: group,
+          variables_attributes: variables_attributes
+        },
         format: :json
     end
 
diff --git a/spec/controllers/groups_controller_spec.rb b/spec/controllers/groups_controller_spec.rb
index 2f19cfb74dd6ba198942d040515c5ddaa847adcb..ba38ccf7f8b5fcee3643ee3394fc03c87f2eea9c 100644
--- a/spec/controllers/groups_controller_spec.rb
+++ b/spec/controllers/groups_controller_spec.rb
@@ -15,7 +15,7 @@
     it 'renders the new page' do
       sign_in(member)
 
-      get :new, parent_id: group.id
+      get :new, params: { parent_id: group.id }
 
       expect(response).to render_template(:new)
     end
@@ -25,7 +25,7 @@
     it 'renders the 404 page' do
       sign_in(member)
 
-      get :new, parent_id: group.id
+      get :new, params: { parent_id: group.id }
 
       expect(response).not_to render_template(:new)
       expect(response.status).to eq(404)
@@ -42,7 +42,7 @@
       it 'assigns events for all the projects in the group' do
         create(:event, project: project)
 
-        get :show, id: group.to_param, format: :atom
+        get :show, params: { id: group.to_param }, format: :atom
 
         expect(assigns(:events)).not_to be_empty
       end
@@ -53,7 +53,7 @@
     it 'sets the badge API endpoint' do
       sign_in(owner)
 
-      get :edit, id: group.to_param
+      get :edit, params: { id: group.to_param }
 
       expect(assigns(:badge_api_endpoint)).not_to be_nil
     end
@@ -102,7 +102,7 @@
           create(:event, project: project)
         end
 
-        get :activity, id: group.to_param, format: :json
+        get :activity, params: { id: group.to_param }, format: :json
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['count']).to eq(3)
@@ -152,7 +152,7 @@
               owner.update_attribute(:can_create_group, can_create_group_status)
               sign_in(owner)
 
-              post :create, group: { parent_id: group.id, path: 'subgroup' }
+              post :create, params: { group: { parent_id: group.id, path: 'subgroup' } }
 
               expect(response).to be_redirect
               expect(response.body).to match(%r{http://test.host/#{group.path}/subgroup})
@@ -166,7 +166,7 @@
 
               previous_group_count = Group.count
 
-              post :create, group: { parent_id: group.id, path: 'subgroup' }
+              post :create, params: { group: { parent_id: group.id, path: 'subgroup' } }
 
               expect(response).to render_template(:new)
               expect(Group.count).to eq(previous_group_count)
@@ -189,7 +189,7 @@
         it 'creates the Group' do
           original_group_count = Group.count
 
-          post :create, group: { path: 'subgroup' }
+          post :create, params: { group: { path: 'subgroup' } }
 
           expect(Group.count).to eq(original_group_count + 1)
           expect(response).to be_redirect
@@ -204,7 +204,7 @@
         it 'does not create the Group' do
           original_group_count = Group.count
 
-          post :create, group: { path: 'subgroup' }
+          post :create, params: { group: { path: 'subgroup' } }
 
           expect(Group.count).to eq(original_group_count)
           expect(response).to render_template(:new)
@@ -247,12 +247,12 @@
 
     context 'sorting by votes' do
       it 'sorts most popular issues' do
-        get :issues, id: group.to_param, sort: 'upvotes_desc'
+        get :issues, params: { id: group.to_param, sort: 'upvotes_desc' }
         expect(assigns(:issues)).to eq [issue_2, issue_1]
       end
 
       it 'sorts least popular issues' do
-        get :issues, id: group.to_param, sort: 'downvotes_desc'
+        get :issues, params: { id: group.to_param, sort: 'downvotes_desc' }
         expect(assigns(:issues)).to eq [issue_2, issue_1]
       end
     end
@@ -265,19 +265,19 @@
       end
 
       it 'works with popularity sort' do
-        get :issues, id: group.to_param, search: 'foo', sort: 'popularity'
+        get :issues, params: { id: group.to_param, search: 'foo', sort: 'popularity' }
 
         expect(assigns(:issues)).to eq([issue_1])
       end
 
       it 'works with priority sort' do
-        get :issues, id: group.to_param, search: 'foo', sort: 'priority'
+        get :issues, params: { id: group.to_param, search: 'foo', sort: 'priority' }
 
         expect(assigns(:issues)).to eq([issue_1])
       end
 
       it 'works with label priority sort' do
-        get :issues, id: group.to_param, search: 'foo', sort: 'label_priority'
+        get :issues, params: { id: group.to_param, search: 'foo', sort: 'label_priority' }
 
         expect(assigns(:issues)).to eq([issue_1])
       end
@@ -298,12 +298,12 @@
 
     context 'sorting by votes' do
       it 'sorts most popular merge requests' do
-        get :merge_requests, id: group.to_param, sort: 'upvotes_desc'
+        get :merge_requests, params: { id: group.to_param, sort: 'upvotes_desc' }
         expect(assigns(:merge_requests)).to eq [merge_request_2, merge_request_1]
       end
 
       it 'sorts least popular merge requests' do
-        get :merge_requests, id: group.to_param, sort: 'downvotes_desc'
+        get :merge_requests, params: { id: group.to_param, sort: 'downvotes_desc' }
         expect(assigns(:merge_requests)).to eq [merge_request_2, merge_request_1]
       end
     end
@@ -314,7 +314,7 @@
       it 'returns 404' do
         sign_in(create(:user))
 
-        delete :destroy, id: group.to_param
+        delete :destroy, params: { id: group.to_param }
 
         expect(response.status).to eq(404)
       end
@@ -327,12 +327,12 @@
 
       it 'schedules a group destroy' do
         Sidekiq::Testing.fake! do
-          expect { delete :destroy, id: group.to_param }.to change(GroupDestroyWorker.jobs, :size).by(1)
+          expect { delete :destroy, params: { id: group.to_param } }.to change(GroupDestroyWorker.jobs, :size).by(1)
         end
       end
 
       it 'redirects to the root path' do
-        delete :destroy, id: group.to_param
+        delete :destroy, params: { id: group.to_param }
 
         expect(response).to redirect_to(root_path)
       end
@@ -345,7 +345,7 @@
     end
 
     it 'updates the path successfully' do
-      post :update, id: group.to_param, group: { path: 'new_path' }
+      post :update, params: { id: group.to_param, group: { path: 'new_path' } }
 
       expect(response).to have_gitlab_http_status(302)
       expect(controller).to set_flash[:notice]
@@ -360,7 +360,7 @@
 
     it 'does not update the path on error' do
       allow_any_instance_of(Group).to receive(:move_dir).and_raise(Gitlab::UpdatePathError)
-      post :update, id: group.to_param, group: { path: 'new_path' }
+      post :update, params: { id: group.to_param, group: { path: 'new_path' } }
 
       expect(assigns(:group).errors).not_to be_empty
       expect(assigns(:group).path).not_to eq('new_path')
@@ -376,7 +376,7 @@
       context 'when requesting groups at the root path' do
         before do
           allow(request).to receive(:original_fullpath).and_return("/#{group_full_path}")
-          get :show, id: group_full_path
+          get :show, params: { id: group_full_path }
         end
 
         context 'when requesting the canonical path with different casing' do
@@ -423,7 +423,7 @@
           context 'non-show path' do
             context 'with exactly matching casing' do
               it 'does not redirect' do
-                get :issues, id: group.to_param
+                get :issues, params: { id: group.to_param }
 
                 expect(response).not_to have_gitlab_http_status(301)
               end
@@ -431,7 +431,7 @@
 
             context 'with different casing' do
               it 'redirects to the correct casing' do
-                get :issues, id: group.to_param.upcase
+                get :issues, params: { id: group.to_param.upcase }
 
                 expect(response).to redirect_to(issues_group_path(group.to_param))
                 expect(controller).not_to set_flash[:notice]
@@ -442,7 +442,7 @@
           context 'show path' do
             context 'with exactly matching casing' do
               it 'does not redirect' do
-                get :show, id: group.to_param
+                get :show, params: { id: group.to_param }
 
                 expect(response).not_to have_gitlab_http_status(301)
               end
@@ -450,7 +450,7 @@
 
             context 'with different casing' do
               it 'redirects to the correct casing at the root path' do
-                get :show, id: group.to_param.upcase
+                get :show, params: { id: group.to_param.upcase }
 
                 expect(response).to redirect_to(group)
                 expect(controller).not_to set_flash[:notice]
@@ -463,7 +463,7 @@
           let(:redirect_route) { group.redirect_routes.create(path: 'old-path') }
 
           it 'redirects to the canonical path' do
-            get :issues, id: redirect_route.path
+            get :issues, params: { id: redirect_route.path }
 
             expect(response).to redirect_to(issues_group_path(group.to_param))
             expect(controller).to set_flash[:notice].to(group_moved_message(redirect_route, group))
@@ -473,7 +473,7 @@
             let(:redirect_route) { group.redirect_routes.create(path: 'http') }
 
             it 'does not modify the requested host' do
-              get :issues, id: redirect_route.path
+              get :issues, params: { id: redirect_route.path }
 
               expect(response).to redirect_to(issues_group_path(group.to_param))
               expect(controller).to set_flash[:notice].to(group_moved_message(redirect_route, group))
@@ -485,7 +485,7 @@
             let(:redirect_route) { group.redirect_routes.create(path: 'oups') }
 
             it 'does not modify the /groups part of the path' do
-              get :issues, id: redirect_route.path
+              get :issues, params: { id: redirect_route.path }
 
               expect(response).to redirect_to(issues_group_path(group.to_param))
               expect(controller).to set_flash[:notice].to(group_moved_message(redirect_route, group))
@@ -497,7 +497,7 @@
             let(:redirect_route) { group.redirect_routes.create(path: 'oups/oup') }
 
             it 'does not modify the /groups part of the path' do
-              get :issues, id: redirect_route.path
+              get :issues, params: { id: redirect_route.path }
 
               expect(response).to redirect_to(issues_group_path(group.to_param))
               expect(controller).to set_flash[:notice].to(group_moved_message(redirect_route, group))
@@ -509,13 +509,13 @@
       context 'for a POST request' do
         context 'when requesting the canonical path with different casing' do
           it 'does not 404' do
-            post :update, id: group.to_param.upcase, group: { path: 'new_path' }
+            post :update, params: { id: group.to_param.upcase, group: { path: 'new_path' } }
 
             expect(response).not_to have_gitlab_http_status(404)
           end
 
           it 'does not redirect to the correct casing' do
-            post :update, id: group.to_param.upcase, group: { path: 'new_path' }
+            post :update, params: { id: group.to_param.upcase, group: { path: 'new_path' } }
 
             expect(response).not_to have_gitlab_http_status(301)
           end
@@ -525,7 +525,7 @@
           let(:redirect_route) { group.redirect_routes.create(path: 'old-path') }
 
           it 'returns not found' do
-            post :update, id: redirect_route.path, group: { path: 'new_path' }
+            post :update, params: { id: redirect_route.path, group: { path: 'new_path' } }
 
             expect(response).to have_gitlab_http_status(404)
           end
@@ -535,13 +535,13 @@
       context 'for a DELETE request' do
         context 'when requesting the canonical path with different casing' do
           it 'does not 404' do
-            delete :destroy, id: group.to_param.upcase
+            delete :destroy, params: { id: group.to_param.upcase }
 
             expect(response).not_to have_gitlab_http_status(404)
           end
 
           it 'does not redirect to the correct casing' do
-            delete :destroy, id: group.to_param.upcase
+            delete :destroy, params: { id: group.to_param.upcase }
 
             expect(response).not_to have_gitlab_http_status(301)
           end
@@ -551,7 +551,7 @@
           let(:redirect_route) { group.redirect_routes.create(path: 'old-path') }
 
           it 'returns not found' do
-            delete :destroy, id: redirect_route.path
+            delete :destroy, params: { id: redirect_route.path }
 
             expect(response).to have_gitlab_http_status(404)
           end
@@ -576,8 +576,10 @@ def group_moved_message(redirect_route, group)
 
       before do
         put :transfer,
-          id: group.to_param,
-          new_parent_group_id: new_parent_group.id
+          params: {
+            id: group.to_param,
+            new_parent_group_id: new_parent_group.id
+          }
       end
 
       it 'should return a notice' do
@@ -595,8 +597,10 @@ def group_moved_message(redirect_route, group)
 
       before do
         put :transfer,
-          id: group.to_param,
-          new_parent_group_id: ''
+          params: {
+            id: group.to_param,
+            new_parent_group_id: ''
+          }
       end
 
       it 'should return a notice' do
@@ -617,8 +621,10 @@ def group_moved_message(redirect_route, group)
         allow_any_instance_of(::Groups::TransferService).to receive(:proceed_to_transfer).and_raise(Gitlab::UpdatePathError, 'namespace directory cannot be moved')
 
         put :transfer,
-          id: group.to_param,
-          new_parent_group_id: new_parent_group.id
+          params: {
+            id: group.to_param,
+            new_parent_group_id: new_parent_group.id
+          }
       end
 
       it 'should return an alert' do
@@ -637,8 +643,10 @@ def group_moved_message(redirect_route, group)
 
       before do
         put :transfer,
-          id: group.to_param,
-          new_parent_group_id: new_parent_group.id
+          params: {
+            id: group.to_param,
+            new_parent_group_id: new_parent_group.id
+          }
       end
 
       it 'should be denied' do
diff --git a/spec/controllers/health_check_controller_spec.rb b/spec/controllers/health_check_controller_spec.rb
index 387ca46ef6f160a25df9deac235062ababc3a682..29e159ad5d79f544827c40a2174385443f36632d 100644
--- a/spec/controllers/health_check_controller_spec.rb
+++ b/spec/controllers/health_check_controller_spec.rb
@@ -37,7 +37,7 @@
         end
 
         it 'supports passing the token in query params' do
-          get :index, token: token
+          get :index, params: { token: token }
 
           expect(response).to be_success
           expect(response.content_type).to eq 'text/plain'
@@ -74,7 +74,7 @@
       end
 
       it 'supports successful responses for specific checks' do
-        get :index, checks: 'email', format: :json
+        get :index, params: { checks: 'email' }, format: :json
 
         expect(response).to be_success
         expect(response.content_type).to eq 'application/json'
@@ -124,7 +124,7 @@
       end
 
       it 'supports failure responses for specific checks' do
-        get :index, checks: 'email', format: :json
+        get :index, params: { checks: 'email' }, format: :json
 
         expect(response).to have_gitlab_http_status(500)
         expect(response.content_type).to eq 'application/json'
diff --git a/spec/controllers/health_controller_spec.rb b/spec/controllers/health_controller_spec.rb
index ec73c89cb115fb110444e67352d5352c85439288..f685f2b41c09537e0817c0ac33c62e71bbe35199 100644
--- a/spec/controllers/health_controller_spec.rb
+++ b/spec/controllers/health_controller_spec.rb
@@ -18,7 +18,7 @@
     shared_context 'endpoint responding with readiness data' do
       let(:request_params) { {} }
 
-      subject { get :readiness, request_params }
+      subject { get :readiness, params: request_params }
 
       it 'responds with readiness checks data' do
         subject
@@ -112,7 +112,7 @@
 
         context 'token passed as URL param' do
           it_behaves_like 'endpoint responding with liveness data' do
-            subject { get :liveness, token: token }
+            subject { get :liveness, params: { token: token } }
           end
         end
       end
diff --git a/spec/controllers/help_controller_spec.rb b/spec/controllers/help_controller_spec.rb
index 21d59c6261344666c163686a2be74c05ecc937e5..5cb284e7e2d6f9c6dc6d7212766c24c348fd4d85 100644
--- a/spec/controllers/help_controller_spec.rb
+++ b/spec/controllers/help_controller_spec.rb
@@ -43,7 +43,7 @@
     context 'for Markdown formats' do
       context 'when requested file exists' do
         before do
-          get :show, path: 'ssh/README', format: :md
+          get :show, params: { path: 'ssh/README' }, format: :md
         end
 
         it 'assigns to @markdown' do
@@ -58,7 +58,7 @@
 
       context 'when requested file is missing' do
         it 'renders not found' do
-          get :show, path: 'foo/bar', format: :md
+          get :show, params: { path: 'foo/bar' }, format: :md
           expect(response).to be_not_found
         end
       end
@@ -68,7 +68,9 @@
       context 'when requested file exists' do
         it 'renders the raw file' do
           get :show,
-              path: 'user/project/img/labels_default',
+              params: {
+                path: 'user/project/img/labels_default'
+              },
               format: :png
           expect(response).to be_success
           expect(response.content_type).to eq 'image/png'
@@ -79,7 +81,9 @@
       context 'when requested file is missing' do
         it 'renders not found' do
           get :show,
-              path: 'foo/bar',
+              params: {
+                path: 'foo/bar'
+              },
               format: :png
           expect(response).to be_not_found
         end
@@ -89,7 +93,9 @@
     context 'for other formats' do
       it 'always renders not found' do
         get :show,
-            path: 'ssh/README',
+            params: {
+              path: 'ssh/README'
+            },
             format: :foo
         expect(response).to be_not_found
       end
diff --git a/spec/controllers/import/bitbucket_controller_spec.rb b/spec/controllers/import/bitbucket_controller_spec.rb
index be49b92d23f1be99401b266e662cbff87a06a94d..51793f2c048cee6c2e10e7efeb84fb4d1e30d57e 100644
--- a/spec/controllers/import/bitbucket_controller_spec.rb
+++ b/spec/controllers/import/bitbucket_controller_spec.rb
@@ -237,7 +237,7 @@ def assign_session_tokens
           .to receive(:new).with(bitbucket_repo, test_name, nested_namespace, user, access_params)
             .and_return(double(execute: project))
 
-        post :create, { target_namespace: nested_namespace.full_path, new_name: test_name, format: :json }
+        post :create, params: { target_namespace: nested_namespace.full_path, new_name: test_name }, format: :json
       end
     end
 
@@ -249,7 +249,7 @@ def assign_session_tokens
           .to receive(:new).with(bitbucket_repo, test_name, kind_of(Namespace), user, access_params)
             .and_return(double(execute: project))
 
-        post :create, { target_namespace: 'foo/bar', new_name: test_name, format: :json }
+        post :create, params: { target_namespace: 'foo/bar', new_name: test_name }, format: :json
       end
 
       it 'creates the namespaces' do
@@ -257,7 +257,7 @@ def assign_session_tokens
           .to receive(:new).with(bitbucket_repo, test_name, kind_of(Namespace), user, access_params)
             .and_return(double(execute: project))
 
-        expect { post :create, { target_namespace: 'foo/bar', new_name: test_name, format: :json } }
+        expect { post :create, params: { target_namespace: 'foo/bar', new_name: test_name }, format: :json }
           .to change { Namespace.count }.by(2)
       end
 
@@ -266,7 +266,7 @@ def assign_session_tokens
           .to receive(:new).with(bitbucket_repo, test_name, kind_of(Namespace), user, access_params)
             .and_return(double(execute: project))
 
-        post :create, { target_namespace: 'foo/bar', new_name: test_name, format: :json }
+        post :create, params: { target_namespace: 'foo/bar', new_name: test_name }, format: :json
 
         expect(Namespace.find_by_path_or_name('bar').parent.path).to eq('foo')
       end
@@ -285,7 +285,7 @@ def assign_session_tokens
           .to receive(:new).with(bitbucket_repo, test_name, kind_of(Namespace), user, access_params)
             .and_return(double(execute: project))
 
-        post :create, { target_namespace: 'foo/foobar/bar', new_name: test_name, format: :json }
+        post :create, params: { target_namespace: 'foo/foobar/bar', new_name: test_name }, format: :json
       end
 
       it 'creates the namespaces' do
@@ -293,7 +293,7 @@ def assign_session_tokens
           .to receive(:new).with(bitbucket_repo, test_name, kind_of(Namespace), user, access_params)
             .and_return(double(execute: project))
 
-        expect { post :create, { target_namespace: 'foo/foobar/bar', new_name: test_name, format: :json } }
+        expect { post :create, params: { target_namespace: 'foo/foobar/bar', new_name: test_name }, format: :json }
           .to change { Namespace.count }.by(2)
       end
     end
@@ -302,7 +302,7 @@ def assign_session_tokens
       it 'returns 422 response' do
         other_namespace = create(:group, name: 'other_namespace')
 
-        post :create, { target_namespace: other_namespace.name, format: :json }
+        post :create, params: { target_namespace: other_namespace.name }, format: :json
 
         expect(response).to have_gitlab_http_status(422)
       end
diff --git a/spec/controllers/import/bitbucket_server_controller_spec.rb b/spec/controllers/import/bitbucket_server_controller_spec.rb
index db9126418940a8b0102c831edba4ef88d2a359c5..73195463a50193d0835ae05bb32850471745da7d 100644
--- a/spec/controllers/import/bitbucket_server_controller_spec.rb
+++ b/spec/controllers/import/bitbucket_server_controller_spec.rb
@@ -42,19 +42,19 @@ def assign_session_tokens
         .to receive(:new).with(project_key, repo_slug, anything, 'my-project', user.namespace, user, anything)
         .and_return(double(execute: project))
 
-      post :create, project: project_key, repository: repo_slug, format: :json
+      post :create, params: { project: project_key, repository: repo_slug }, format: :json
 
       expect(response).to have_gitlab_http_status(200)
     end
 
     it 'returns an error when an invalid project key is used' do
-      post :create, project: 'some&project'
+      post :create, params: { project: 'some&project' }
 
       expect(response).to have_gitlab_http_status(422)
     end
 
     it 'returns an error when an invalid repository slug is used' do
-      post :create, project: 'some-project', repository: 'try*this'
+      post :create, params: { project: 'some-project', repository: 'try*this' }
 
       expect(response).to have_gitlab_http_status(422)
     end
@@ -62,7 +62,7 @@ def assign_session_tokens
     it 'returns an error when the project cannot be found' do
       allow(client).to receive(:repo).with(project_key, repo_slug).and_return(nil)
 
-      post :create, project: project_key, repository: repo_slug, format: :json
+      post :create, params: { project: project_key, repository: repo_slug }, format: :json
 
       expect(response).to have_gitlab_http_status(422)
     end
@@ -72,7 +72,7 @@ def assign_session_tokens
         .to receive(:new).with(project_key, repo_slug, anything, 'my-project', user.namespace, user, anything)
         .and_return(double(execute: build(:project)))
 
-      post :create, project: project_key, repository: repo_slug, format: :json
+      post :create, params: { project: project_key, repository: repo_slug }, format: :json
 
       expect(response).to have_gitlab_http_status(422)
     end
@@ -80,7 +80,7 @@ def assign_session_tokens
     it "returns an error when the server can't be contacted" do
       expect(client).to receive(:repo).with(project_key, repo_slug).and_raise(BitbucketServer::Client::ServerError)
 
-      post :create, project: project_key, repository: repo_slug, format: :json
+      post :create, params: { project: project_key, repository: repo_slug }, format: :json
 
       expect(response).to have_gitlab_http_status(422)
     end
@@ -103,7 +103,7 @@ def assign_session_tokens
     end
 
     it 'sets the session variables' do
-      post :configure, personal_access_token: token, bitbucket_username: username, bitbucket_server_url: url
+      post :configure, params: { personal_access_token: token, bitbucket_username: username, bitbucket_server_url: url }
 
       expect(session[:bitbucket_server_url]).to eq(url)
       expect(session[:bitbucket_server_username]).to eq(username)
diff --git a/spec/controllers/import/gitlab_controller_spec.rb b/spec/controllers/import/gitlab_controller_spec.rb
index 742f47871264ad61eeb1fa54e481b095b521adb2..a874a7d36f6a9c4fca06aea5a2ab6dded0d96cca 100644
--- a/spec/controllers/import/gitlab_controller_spec.rb
+++ b/spec/controllers/import/gitlab_controller_spec.rb
@@ -209,7 +209,7 @@ def assign_session_token
             .to receive(:new).with(gitlab_repo, nested_namespace, user, access_params)
               .and_return(double(execute: project))
 
-          post :create, { target_namespace: nested_namespace.full_path, format: :json }
+          post :create, params: { target_namespace: nested_namespace.full_path }, format: :json
         end
       end
 
@@ -221,7 +221,7 @@ def assign_session_token
             .to receive(:new).with(gitlab_repo, kind_of(Namespace), user, access_params)
               .and_return(double(execute: project))
 
-          post :create, { target_namespace: 'foo/bar', format: :json }
+          post :create, params: { target_namespace: 'foo/bar' }, format: :json
         end
 
         it 'creates the namespaces' do
@@ -229,7 +229,7 @@ def assign_session_token
             .to receive(:new).with(gitlab_repo, kind_of(Namespace), user, access_params)
               .and_return(double(execute: project))
 
-          expect { post :create, { target_namespace: 'foo/bar', format: :json } }
+          expect { post :create, params: { target_namespace: 'foo/bar' }, format: :json }
             .to change { Namespace.count }.by(2)
         end
 
@@ -238,7 +238,7 @@ def assign_session_token
             .to receive(:new).with(gitlab_repo, kind_of(Namespace), user, access_params)
               .and_return(double(execute: project))
 
-          post :create, { target_namespace: 'foo/bar', format: :json }
+          post :create, params: { target_namespace: 'foo/bar' }, format: :json
 
           expect(Namespace.find_by_path_or_name('bar').parent.path).to eq('foo')
         end
@@ -257,7 +257,7 @@ def assign_session_token
             .to receive(:new).with(gitlab_repo, kind_of(Namespace), user, access_params)
               .and_return(double(execute: project))
 
-          post :create, { target_namespace: 'foo/foobar/bar', format: :json }
+          post :create, params: { target_namespace: 'foo/foobar/bar' }, format: :json
         end
 
         it 'creates the namespaces' do
@@ -265,7 +265,7 @@ def assign_session_token
             .to receive(:new).with(gitlab_repo, kind_of(Namespace), user, access_params)
               .and_return(double(execute: project))
 
-          expect { post :create, { target_namespace: 'foo/foobar/bar', format: :json } }
+          expect { post :create, params: { target_namespace: 'foo/foobar/bar' }, format: :json }
             .to change { Namespace.count }.by(2)
         end
       end
@@ -274,7 +274,7 @@ def assign_session_token
         it 'returns 422 response' do
           other_namespace = create(:group, name: 'other_namespace')
 
-          post :create, { target_namespace: other_namespace.name, format: :json }
+          post :create, params: { target_namespace: other_namespace.name }, format: :json
 
           expect(response).to have_gitlab_http_status(422)
         end
diff --git a/spec/controllers/import/gitlab_projects_controller_spec.rb b/spec/controllers/import/gitlab_projects_controller_spec.rb
index cbd1a11260225aa4bacdbbe77e590ce4456d2955..55bd8ae71829fdf723531570f3a0f28e40a7f1c8 100644
--- a/spec/controllers/import/gitlab_projects_controller_spec.rb
+++ b/spec/controllers/import/gitlab_projects_controller_spec.rb
@@ -12,14 +12,14 @@
   describe 'POST create' do
     context 'with an invalid path' do
       it 'redirects with an error' do
-        post :create, namespace_id: namespace.id, path: '/test', file: file
+        post :create, params: { namespace_id: namespace.id, path: '/test', file: file }
 
         expect(flash[:alert]).to start_with('Project could not be imported')
         expect(response).to have_gitlab_http_status(302)
       end
 
       it 'redirects with an error when a relative path is used' do
-        post :create, namespace_id: namespace.id, path: '../test', file: file
+        post :create, params: { namespace_id: namespace.id, path: '../test', file: file }
 
         expect(flash[:alert]).to start_with('Project could not be imported')
         expect(response).to have_gitlab_http_status(302)
@@ -28,7 +28,7 @@
 
     context 'with a valid path' do
       it 'redirects to the new project path' do
-        post :create, namespace_id: namespace.id, path: 'test', file: file
+        post :create, params: { namespace_id: namespace.id, path: 'test', file: file }
 
         expect(flash[:notice]).to include('is being imported')
         expect(response).to have_gitlab_http_status(302)
diff --git a/spec/controllers/import/google_code_controller_spec.rb b/spec/controllers/import/google_code_controller_spec.rb
index 0763492d88a9d86439a2c74ecd7473e569b317a7..3e5ed2afd93e604e5c742a695a35cf845491b8aa 100644
--- a/spec/controllers/import/google_code_controller_spec.rb
+++ b/spec/controllers/import/google_code_controller_spec.rb
@@ -12,7 +12,7 @@
 
   describe "POST callback" do
     it "stores Google Takeout dump list in session" do
-      post :callback, dump_file: dump_file
+      post :callback, params: { dump_file: dump_file }
 
       expect(session[:google_code_dump]).to be_a(Hash)
       expect(session[:google_code_dump]["kind"]).to eq("projecthosting#user")
diff --git a/spec/controllers/invites_controller_spec.rb b/spec/controllers/invites_controller_spec.rb
index 6c09ca7dc66bd17dc3c62ee65b6c9d2301e64ef2..7bbaf36e4df756768dd6d66f86b3b057aa911c59 100644
--- a/spec/controllers/invites_controller_spec.rb
+++ b/spec/controllers/invites_controller_spec.rb
@@ -12,7 +12,7 @@
 
   describe 'GET #accept' do
     it 'accepts user' do
-      get :accept, id: token
+      get :accept, params: { id: token }
       member.reload
 
       expect(response).to have_gitlab_http_status(302)
@@ -23,7 +23,7 @@
 
   describe 'GET #decline' do
     it 'declines user' do
-      get :decline, id: token
+      get :decline, params: { id: token }
       expect {member.reload}.to raise_error ActiveRecord::RecordNotFound
 
       expect(response).to have_gitlab_http_status(302)
diff --git a/spec/controllers/ldap/omniauth_callbacks_controller_spec.rb b/spec/controllers/ldap/omniauth_callbacks_controller_spec.rb
index 87c10a86cdd6440c0e821c37e94b3a4becfef450..c9d36a1600850cafd6bc339a98bd364254d43c7b 100644
--- a/spec/controllers/ldap/omniauth_callbacks_controller_spec.rb
+++ b/spec/controllers/ldap/omniauth_callbacks_controller_spec.rb
@@ -11,7 +11,7 @@
 
   it 'respects remember me checkbox' do
     expect do
-      post provider, remember_me: '1'
+      post provider, params: { remember_me: '1' }
     end.to change { user.reload.remember_created_at }.from(nil)
   end
 
@@ -19,7 +19,7 @@
     let(:user) { create(:omniauth_user, :two_factor_via_otp, extern_uid: uid, provider: provider) }
 
     it 'passes remember_me to the Devise view' do
-      post provider, remember_me: '1'
+      post provider, params: { remember_me: '1' }
 
       expect(assigns[:user].remember_me).to eq '1'
     end
diff --git a/spec/controllers/notification_settings_controller_spec.rb b/spec/controllers/notification_settings_controller_spec.rb
index a3356a86d4be04f59de2e80297c068f908045cea..cf52ce834b6741c2252ddee74faf707294fe6110 100644
--- a/spec/controllers/notification_settings_controller_spec.rb
+++ b/spec/controllers/notification_settings_controller_spec.rb
@@ -13,8 +13,10 @@
     context 'when not authorized' do
       it 'redirects to sign in page' do
         post :create,
-             project_id: project.id,
-             notification_setting: { level: :participating }
+             params: {
+               project_id: project.id,
+               notification_setting: { level: :participating }
+             }
 
         expect(response).to redirect_to(new_user_session_path)
       end
@@ -41,8 +43,10 @@
 
         it 'creates notification setting' do
           post :create,
-               project_id: project.id,
-               notification_setting: { level: :participating }
+               params: {
+                 project_id: project.id,
+                 notification_setting: { level: :participating }
+               }
 
           expect(response.status).to eq 200
           expect(notification_setting.level).to eq("participating")
@@ -54,8 +58,10 @@
         context 'with custom settings' do
           it 'creates notification setting' do
             post :create,
-                 project_id: project.id,
-                 notification_setting: { level: :custom }.merge(custom_events)
+                 params: {
+                   project_id: project.id,
+                   notification_setting: { level: :custom }.merge(custom_events)
+                 }
 
             expect(response.status).to eq 200
             expect(notification_setting.level).to eq("custom")
@@ -72,8 +78,10 @@
 
         it 'creates notification setting' do
           post :create,
-               namespace_id: group.id,
-               notification_setting: { level: :watch }
+               params: {
+                 namespace_id: group.id,
+                 notification_setting: { level: :watch }
+               }
 
           expect(response.status).to eq 200
           expect(notification_setting.level).to eq("watch")
@@ -85,8 +93,10 @@
         context 'with custom settings' do
           it 'creates notification setting' do
             post :create,
-                 namespace_id: group.id,
-                 notification_setting: { level: :custom }.merge(custom_events)
+                 params: {
+                   namespace_id: group.id,
+                   notification_setting: { level: :custom }.merge(custom_events)
+                 }
 
             expect(response.status).to eq 200
             expect(notification_setting.level).to eq("custom")
@@ -108,8 +118,10 @@
 
       it 'returns 404' do
         post :create,
-             project_id: private_project.id,
-             notification_setting: { level: :participating }
+             params: {
+               project_id: private_project.id,
+               notification_setting: { level: :participating }
+             }
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -122,8 +134,10 @@
     context 'when not authorized' do
       it 'redirects to sign in page' do
         put :update,
-            id: notification_setting,
-            notification_setting: { level: :participating }
+            params: {
+              id: notification_setting,
+              notification_setting: { level: :participating }
+            }
 
         expect(response).to redirect_to(new_user_session_path)
       end
@@ -136,8 +150,10 @@
 
       it 'returns success' do
         put :update,
-            id: notification_setting,
-            notification_setting: { level: :participating }
+            params: {
+              id: notification_setting,
+              notification_setting: { level: :participating }
+            }
 
         expect(response.status).to eq 200
       end
@@ -153,8 +169,10 @@
 
         it 'returns success' do
           put :update,
-              id: notification_setting,
-              notification_setting: { level: :participating, events: custom_events }
+              params: {
+                id: notification_setting,
+                notification_setting: { level: :participating, events: custom_events }
+              }
 
           expect(response.status).to eq 200
         end
@@ -170,8 +188,10 @@
 
       it 'returns 404' do
         put :update,
-            id: notification_setting,
-            notification_setting: { level: :participating }
+            params: {
+              id: notification_setting,
+              notification_setting: { level: :participating }
+            }
 
         expect(response).to have_gitlab_http_status(404)
       end
diff --git a/spec/controllers/oauth/applications_controller_spec.rb b/spec/controllers/oauth/applications_controller_spec.rb
index 6d650512f5edd60b5868a45990d3cb46e9cffe59..e07d3114e442b85c5ec4d55406bc57478eae3e45 100644
--- a/spec/controllers/oauth/applications_controller_spec.rb
+++ b/spec/controllers/oauth/applications_controller_spec.rb
@@ -26,7 +26,7 @@
 
     describe 'POST #create' do
       it 'creates an application' do
-        post :create, oauth_params
+        post :create, params: oauth_params
 
         expect(response).to have_gitlab_http_status(302)
         expect(response).to redirect_to(oauth_application_path(Doorkeeper::Application.last))
@@ -35,7 +35,7 @@
       it 'redirects back to profile page if OAuth applications are disabled' do
         disable_user_oauth
 
-        post :create, oauth_params
+        post :create, params: oauth_params
 
         expect(response).to have_gitlab_http_status(302)
         expect(response).to redirect_to(profile_path)
@@ -52,7 +52,7 @@
             }
           }
 
-          post :create, invalid_uri_params
+          post :create, params: invalid_uri_params
 
           expect(response.body).to include 'Redirect URI is forbidden by the server'
         end
diff --git a/spec/controllers/oauth/authorizations_controller_spec.rb b/spec/controllers/oauth/authorizations_controller_spec.rb
index 8c10ea53a7a88dd2de001e3e910bf69629f91a4e..cc8fa2c01b4550aa9341ed2c246434e1b41389f2 100644
--- a/spec/controllers/oauth/authorizations_controller_spec.rb
+++ b/spec/controllers/oauth/authorizations_controller_spec.rb
@@ -30,7 +30,7 @@
       render_views
 
       it 'returns 200 code and renders view' do
-        get :new, params
+        get :new, params: params
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to render_template('doorkeeper/authorizations/new')
@@ -40,7 +40,7 @@
         application.update(trusted: true)
         request.session['user_return_to'] = 'http://example.com'
 
-        get :new, params
+        get :new, params: params
 
         expect(request.session['user_return_to']).to be_nil
         expect(response).to have_gitlab_http_status(302)
@@ -57,7 +57,7 @@
           end
 
           it 'authorizes the request and redirects' do
-            get :new, params
+            get :new, params: params
 
             expect(request.session['user_return_to']).to be_nil
             expect(response).to have_gitlab_http_status(302)
diff --git a/spec/controllers/passwords_controller_spec.rb b/spec/controllers/passwords_controller_spec.rb
index 4d31cfedbd2b8368ad34517006b54ea00f065ca1..0af55cf34082f1a22e2e3f47df25795be5d725c3 100644
--- a/spec/controllers/passwords_controller_spec.rb
+++ b/spec/controllers/passwords_controller_spec.rb
@@ -22,7 +22,7 @@
       let(:user) { create(:omniauth_user, provider: 'ldapmain', email: 'ldapuser@gitlab.com') }
 
       it 'prevents a password reset' do
-        post :create, user: { email: user.email }
+        post :create, params: { user: { email: user.email } }
 
         expect(flash[:alert]).to eq 'Password authentication is unavailable.'
       end
diff --git a/spec/controllers/profiles/accounts_controller_spec.rb b/spec/controllers/profiles/accounts_controller_spec.rb
index f8d9d7e39eebcc823322e71fa0239ec145d1e44b..bb2ab27e2dd78180b029b0b26e685f87d72c44de 100644
--- a/spec/controllers/profiles/accounts_controller_spec.rb
+++ b/spec/controllers/profiles/accounts_controller_spec.rb
@@ -9,7 +9,7 @@
     end
 
     it 'renders 404 if someone tries to unlink a non existent provider' do
-      delete :unlink, provider: 'github'
+      delete :unlink, params: { provider: 'github' }
 
       expect(response).to have_gitlab_http_status(404)
     end
@@ -21,7 +21,7 @@
         it "does not allow to unlink connected account" do
           identity = user.identities.last
 
-          delete :unlink, provider: provider.to_s
+          delete :unlink, params: { provider: provider.to_s }
 
           expect(response).to have_gitlab_http_status(302)
           expect(user.reload.identities).to include(identity)
@@ -36,7 +36,7 @@
         it 'allows to unlink connected account' do
           identity = user.identities.last
 
-          delete :unlink, provider: provider.to_s
+          delete :unlink, params: { provider: provider.to_s }
 
           expect(response).to have_gitlab_http_status(302)
           expect(user.reload.identities).not_to include(identity)
diff --git a/spec/controllers/profiles/emails_controller_spec.rb b/spec/controllers/profiles/emails_controller_spec.rb
index ecf14aad54f39d345f568371a5c690892e98425a..a8a1f96befe9a232f350f5dc70b8e44c1377c10e 100644
--- a/spec/controllers/profiles/emails_controller_spec.rb
+++ b/spec/controllers/profiles/emails_controller_spec.rb
@@ -11,7 +11,7 @@
     let(:email_params) { { email: "add_email@example.com" } }
 
     it 'sends an email confirmation' do
-      expect { post(:create, { email: email_params }) }.to change { ActionMailer::Base.deliveries.size }
+      expect { post(:create, params: { email: email_params }) }.to change { ActionMailer::Base.deliveries.size }
       expect(ActionMailer::Base.deliveries.last.to).to eq [email_params[:email]]
       expect(ActionMailer::Base.deliveries.last.subject).to match "Confirmation instructions"
     end
@@ -23,13 +23,13 @@
     it 'resends an email confirmation' do
       email = user.emails.create(email: 'add_email@example.com')
 
-      expect { put(:resend_confirmation_instructions, { id: email }) }.to change { ActionMailer::Base.deliveries.size }
+      expect { put(:resend_confirmation_instructions, params: { id: email }) }.to change { ActionMailer::Base.deliveries.size }
       expect(ActionMailer::Base.deliveries.last.to).to eq [email_params[:email]]
       expect(ActionMailer::Base.deliveries.last.subject).to match "Confirmation instructions"
     end
 
     it 'unable to resend an email confirmation' do
-      expect { put(:resend_confirmation_instructions, { id: 1 }) }.not_to change { ActionMailer::Base.deliveries.size }
+      expect { put(:resend_confirmation_instructions, params: { id: 1 }) }.not_to change { ActionMailer::Base.deliveries.size }
     end
   end
 end
diff --git a/spec/controllers/profiles/keys_controller_spec.rb b/spec/controllers/profiles/keys_controller_spec.rb
index d55d15d0db88f8bb43b83140cfa7597aad64f734..5e2cc82bd8c92df7a17072ba99c7f3ef40d13d6a 100644
--- a/spec/controllers/profiles/keys_controller_spec.rb
+++ b/spec/controllers/profiles/keys_controller_spec.rb
@@ -6,7 +6,7 @@
   describe "#get_keys" do
     describe "non existent user" do
       it "does not generally work" do
-        get :get_keys, username: 'not-existent'
+        get :get_keys, params: { username: 'not-existent' }
 
         expect(response).not_to be_success
       end
@@ -14,19 +14,19 @@
 
     describe "user with no keys" do
       it "does generally work" do
-        get :get_keys, username: user.username
+        get :get_keys, params: { username: user.username }
 
         expect(response).to be_success
       end
 
       it "renders all keys separated with a new line" do
-        get :get_keys, username: user.username
+        get :get_keys, params: { username: user.username }
 
         expect(response.body).to eq("")
       end
 
       it "responds with text/plain content type" do
-        get :get_keys, username: user.username
+        get :get_keys, params: { username: user.username }
         expect(response.content_type).to eq("text/plain")
       end
     end
@@ -37,13 +37,13 @@
       let!(:deploy_key) { create(:deploy_key, user: user) }
 
       it "does generally work" do
-        get :get_keys, username: user.username
+        get :get_keys, params: { username: user.username }
 
         expect(response).to be_success
       end
 
       it "renders all non deploy keys separated with a new line" do
-        get :get_keys, username: user.username
+        get :get_keys, params: { username: user.username }
 
         expect(response.body).not_to eq('')
         expect(response.body).to eq(user.all_ssh_keys.join("\n"))
@@ -55,13 +55,13 @@
       end
 
       it "does not render the comment of the key" do
-        get :get_keys, username: user.username
+        get :get_keys, params: { username: user.username }
 
         expect(response.body).not_to match(/dummy@gitlab.com/)
       end
 
       it "responds with text/plain content type" do
-        get :get_keys, username: user.username
+        get :get_keys, params: { username: user.username }
 
         expect(response.content_type).to eq("text/plain")
       end
diff --git a/spec/controllers/profiles/notifications_controller_spec.rb b/spec/controllers/profiles/notifications_controller_spec.rb
index b97cdd4d489d7e722ede7db59f20609aca391995..1b76446a0cf81de371bcd22ee11f6994d6326381 100644
--- a/spec/controllers/profiles/notifications_controller_spec.rb
+++ b/spec/controllers/profiles/notifications_controller_spec.rb
@@ -24,7 +24,7 @@
     it 'updates only permitted attributes' do
       sign_in(user)
 
-      put :update, user: { notification_email: 'new@example.com', notified_of_own_activity: true, admin: true }
+      put :update, params: { user: { notification_email: 'new@example.com', notified_of_own_activity: true, admin: true } }
 
       user.reload
       expect(user.notification_email).to eq('new@example.com')
@@ -36,7 +36,7 @@
     it 'shows an error message if the params are invalid' do
       sign_in(user)
 
-      put :update, user: { notification_email: '' }
+      put :update, params: { user: { notification_email: '' } }
 
       expect(user.reload.notification_email).to eq('original@example.com')
       expect(controller).to set_flash[:alert].to('Failed to save new settings')
diff --git a/spec/controllers/profiles/personal_access_tokens_controller_spec.rb b/spec/controllers/profiles/personal_access_tokens_controller_spec.rb
index f5860d4296be1e7c150c772ab5575ef3ed8a2c86..021bf2429e34424adf9c86b7c1efbfdc54332f25 100644
--- a/spec/controllers/profiles/personal_access_tokens_controller_spec.rb
+++ b/spec/controllers/profiles/personal_access_tokens_controller_spec.rb
@@ -17,7 +17,7 @@ def created_token
       name = 'My PAT'
       scopes = %w[api read_user]
 
-      post :create, personal_access_token: token_attributes.merge(scopes: scopes, name: name)
+      post :create, params: { personal_access_token: token_attributes.merge(scopes: scopes, name: name) }
 
       expect(created_token).not_to be_nil
       expect(created_token.name).to eq(name)
@@ -28,7 +28,7 @@ def created_token
     it "allows creation of a token with an expiry date" do
       expires_at = 5.days.from_now.to_date
 
-      post :create, personal_access_token: token_attributes.merge(expires_at: expires_at)
+      post :create, params: { personal_access_token: token_attributes.merge(expires_at: expires_at) }
 
       expect(created_token).not_to be_nil
       expect(created_token.expires_at).to eq(expires_at)
diff --git a/spec/controllers/profiles/preferences_controller_spec.rb b/spec/controllers/profiles/preferences_controller_spec.rb
index b580e773459737030d1377dd42cfb233a25dc9b1..012f016b091c246106ed020d5f621682f526f0a2 100644
--- a/spec/controllers/profiles/preferences_controller_spec.rb
+++ b/spec/controllers/profiles/preferences_controller_spec.rb
@@ -29,7 +29,7 @@ def go(params: {}, format: :js)
         theme_id: '1'
       )
 
-      patch :update, user: params, format: format
+      patch :update, params: { user: params }, format: format
     end
 
     context 'on successful update' do
diff --git a/spec/controllers/profiles/two_factor_auths_controller_spec.rb b/spec/controllers/profiles/two_factor_auths_controller_spec.rb
index d08d0018b359a40bcf192afa6f490e2b0c84b9f0..0151a43499880df4c6f3b6281aa26ba4b358d9c3 100644
--- a/spec/controllers/profiles/two_factor_auths_controller_spec.rb
+++ b/spec/controllers/profiles/two_factor_auths_controller_spec.rb
@@ -32,7 +32,7 @@
     let(:pin)  { 'pin-code' }
 
     def go
-      post :create, pin_code: pin
+      post :create, params: { pin_code: pin }
     end
 
     context 'with valid pin' do
diff --git a/spec/controllers/profiles_controller_spec.rb b/spec/controllers/profiles_controller_spec.rb
index 360c536c667d017c6deb16d8c5dae9539b46bbfc..11cb59aa12a93654c086769b8add9d167c40cdf9 100644
--- a/spec/controllers/profiles_controller_spec.rb
+++ b/spec/controllers/profiles_controller_spec.rb
@@ -9,7 +9,7 @@
 
       expect do
         post :update,
-             user: { password: 'hello12345', password_confirmation: 'hello12345' }
+             params: { user: { password: 'hello12345', password_confirmation: 'hello12345' } }
       end.not_to change { user.reload.encrypted_password }
 
       expect(response.status).to eq(302)
@@ -21,7 +21,7 @@
       sign_in(user)
 
       put :update,
-          user: { email: "john@gmail.com", name: "John" }
+          params: { user: { email: "john@gmail.com", name: "John" } }
 
       user.reload
 
@@ -35,7 +35,7 @@
       sign_in(user)
 
       put :update,
-          user: { email: "john@gmail.com", name: "John" }
+          params: { user: { email: "john@gmail.com", name: "John" } }
 
       user.reload
 
@@ -52,7 +52,7 @@
       sign_in(ldap_user)
 
       put :update,
-          user: { email: "john@gmail.com", name: "John" }
+          params: { user: { email: "john@gmail.com", name: "John" } }
 
       ldap_user.reload
 
@@ -69,7 +69,7 @@
       sign_in(ldap_user)
 
       put :update,
-          user: { email: "john@gmail.com", name: "John", location: "City, Country" }
+          params: { user: { email: "john@gmail.com", name: "John", location: "City, Country" } }
 
       ldap_user.reload
 
@@ -82,7 +82,7 @@
     it 'allows setting a user status' do
       sign_in(user)
 
-      put :update, user: { status: { message: 'Working hard!' } }
+      put :update, params: { user: { status: { message: 'Working hard!' } } }
 
       expect(user.reload.status.message).to eq('Working hard!')
       expect(response).to have_gitlab_http_status(302)
@@ -98,7 +98,7 @@
       sign_in(user)
 
       put :update_username,
-        user: { username: new_username }
+        params: { user: { username: new_username } }
 
       user.reload
 
@@ -110,7 +110,9 @@
       sign_in(user)
 
       put :update_username,
-          user: { username: new_username },
+          params: {
+            user: { username: new_username }
+          },
           format: :json
 
       expect(response.status).to eq(200)
@@ -121,7 +123,9 @@
       sign_in(user)
 
       put :update_username,
-          user: { username: 'invalid username.git' },
+          params: {
+            user: { username: 'invalid username.git' }
+          },
           format: :json
 
       expect(response.status).to eq(422)
@@ -131,7 +135,7 @@
     it 'raises a correct error when the username is missing' do
       sign_in(user)
 
-      expect { put :update_username, user: { gandalf: 'you shall not pass' } }
+      expect { put :update_username, params: { user: { gandalf: 'you shall not pass' } } }
         .to raise_error(ActionController::ParameterMissing)
     end
 
@@ -142,7 +146,7 @@
         sign_in(user)
 
         put :update_username,
-          user: { username: new_username }
+          params: { user: { username: new_username } }
 
         user.reload
 
@@ -160,7 +164,7 @@
         sign_in(user)
 
         put :update_username,
-          user: { username: new_username }
+          params: { user: { username: new_username } }
 
         user.reload
 
diff --git a/spec/controllers/projects/artifacts_controller_spec.rb b/spec/controllers/projects/artifacts_controller_spec.rb
index b3c8d6a954ec14ff4bb2fdf3af5fba824533ece6..bd10de45b67a16e531d14189f01a22b7ad99f93f 100644
--- a/spec/controllers/projects/artifacts_controller_spec.rb
+++ b/spec/controllers/projects/artifacts_controller_spec.rb
@@ -22,7 +22,7 @@
     def download_artifact(extra_params = {})
       params = { namespace_id: project.namespace, project_id: project, job_id: job }.merge(extra_params)
 
-      get :download, params
+      get :download, params: params
     end
 
     context 'when no file type is supplied' do
@@ -86,7 +86,7 @@ def download_artifact(extra_params = {})
   describe 'GET browse' do
     context 'when the directory exists' do
       it 'renders the browse view' do
-        get :browse, namespace_id: project.namespace, project_id: project, job_id: job, path: 'other_artifacts_0.1.2'
+        get :browse, params: { namespace_id: project.namespace, project_id: project, job_id: job, path: 'other_artifacts_0.1.2' }
 
         expect(response).to render_template('projects/artifacts/browse')
       end
@@ -94,7 +94,7 @@ def download_artifact(extra_params = {})
 
     context 'when the directory does not exist' do
       it 'responds Not Found' do
-        get :browse, namespace_id: project.namespace, project_id: project, job_id: job, path: 'unknown'
+        get :browse, params: { namespace_id: project.namespace, project_id: project, job_id: job, path: 'unknown' }
 
         expect(response).to be_not_found
       end
@@ -113,7 +113,7 @@ def download_artifact(extra_params = {})
 
       context 'when the file exists' do
         it 'renders the file view' do
-          get :file, namespace_id: project.namespace, project_id: project, job_id: job, path: 'ci_artifacts.txt'
+          get :file, params: { namespace_id: project.namespace, project_id: project, job_id: job, path: 'ci_artifacts.txt' }
 
           expect(response).to have_gitlab_http_status(302)
         end
@@ -121,7 +121,7 @@ def download_artifact(extra_params = {})
 
       context 'when the file does not exist' do
         it 'responds Not Found' do
-          get :file, namespace_id: project.namespace, project_id: project, job_id: job, path: 'unknown'
+          get :file, params: { namespace_id: project.namespace, project_id: project, job_id: job, path: 'unknown' }
 
           expect(response).to be_not_found
         end
@@ -131,7 +131,7 @@ def download_artifact(extra_params = {})
     context 'when the file is served through Rails' do
       context 'when the file exists' do
         it 'renders the file view' do
-          get :file, namespace_id: project.namespace, project_id: project, job_id: job, path: 'ci_artifacts.txt'
+          get :file, params: { namespace_id: project.namespace, project_id: project, job_id: job, path: 'ci_artifacts.txt' }
 
           expect(response).to have_gitlab_http_status(:ok)
           expect(response).to render_template('projects/artifacts/file')
@@ -140,7 +140,7 @@ def download_artifact(extra_params = {})
 
       context 'when the file does not exist' do
         it 'responds Not Found' do
-          get :file, namespace_id: project.namespace, project_id: project, job_id: job, path: 'unknown'
+          get :file, params: { namespace_id: project.namespace, project_id: project, job_id: job, path: 'unknown' }
 
           expect(response).to be_not_found
         end
@@ -159,7 +159,7 @@ def download_artifact(extra_params = {})
       end
 
       it 'does not redirect the request' do
-        get :file, namespace_id: private_project.namespace, project_id: private_project, job_id: job, path: 'ci_artifacts.txt'
+        get :file, params: { namespace_id: private_project.namespace, project_id: private_project, job_id: job, path: 'ci_artifacts.txt' }
 
         expect(response).to have_gitlab_http_status(:ok)
         expect(response).to render_template('projects/artifacts/file')
@@ -168,7 +168,7 @@ def download_artifact(extra_params = {})
   end
 
   describe 'GET raw' do
-    subject { get(:raw, namespace_id: project.namespace, project_id: project, job_id: job, path: path) }
+    subject { get(:raw, params: { namespace_id: project.namespace, project_id: project, job_id: job, path: path }) }
 
     context 'when the file exists' do
       let(:path) { 'ci_artifacts.txt' }
@@ -239,7 +239,7 @@ def params_from_ref(ref = pipeline.ref, job_name = job.name, path = 'browse')
 
       context 'has no such ref' do
         before do
-          get :latest_succeeded, params_from_ref('TAIL', job.name)
+          get :latest_succeeded, params: params_from_ref('TAIL', job.name)
         end
 
         it_behaves_like 'not found'
@@ -247,7 +247,7 @@ def params_from_ref(ref = pipeline.ref, job_name = job.name, path = 'browse')
 
       context 'has no such job' do
         before do
-          get :latest_succeeded, params_from_ref(pipeline.ref, 'NOBUILD')
+          get :latest_succeeded, params: params_from_ref(pipeline.ref, 'NOBUILD')
         end
 
         it_behaves_like 'not found'
@@ -255,7 +255,7 @@ def params_from_ref(ref = pipeline.ref, job_name = job.name, path = 'browse')
 
       context 'has no path' do
         before do
-          get :latest_succeeded, params_from_ref(pipeline.sha, job.name, '')
+          get :latest_succeeded, params: params_from_ref(pipeline.sha, job.name, '')
         end
 
         it_behaves_like 'not found'
@@ -276,7 +276,7 @@ def params_from_ref(ref = pipeline.ref, job_name = job.name, path = 'browse')
           pipeline.update(ref: 'master',
                           sha: project.commit('master').sha)
 
-          get :latest_succeeded, params_from_ref('master')
+          get :latest_succeeded, params: params_from_ref('master')
         end
 
         it_behaves_like 'redirect to the job'
@@ -287,7 +287,7 @@ def params_from_ref(ref = pipeline.ref, job_name = job.name, path = 'browse')
           pipeline.update(ref: 'improve/awesome',
                           sha: project.commit('improve/awesome').sha)
 
-          get :latest_succeeded, params_from_ref('improve/awesome')
+          get :latest_succeeded, params: params_from_ref('improve/awesome')
         end
 
         it_behaves_like 'redirect to the job'
@@ -298,7 +298,7 @@ def params_from_ref(ref = pipeline.ref, job_name = job.name, path = 'browse')
           pipeline.update(ref: 'improve/awesome',
                           sha: project.commit('improve/awesome').sha)
 
-          get :latest_succeeded, params_from_ref('improve/awesome', job.name, 'file/README.md')
+          get :latest_succeeded, params: params_from_ref('improve/awesome', job.name, 'file/README.md')
         end
 
         it 'redirects' do
diff --git a/spec/controllers/projects/avatars_controller_spec.rb b/spec/controllers/projects/avatars_controller_spec.rb
index 5a77a7ac06fc0406337d77cfcd4e0c88a672368f..40ab81395ea9de4ed963ea0f2504d8f399a6add0 100644
--- a/spec/controllers/projects/avatars_controller_spec.rb
+++ b/spec/controllers/projects/avatars_controller_spec.rb
@@ -8,7 +8,7 @@
   end
 
   describe 'GET #show' do
-    subject { get :show, namespace_id: project.namespace, project_id: project }
+    subject { get :show, params: { namespace_id: project.namespace, project_id: project } }
 
     context 'when repository has no avatar' do
       it 'shows 404' do
@@ -71,7 +71,7 @@
 
   describe 'DELETE #destroy' do
     it 'removes avatar from DB by calling destroy' do
-      delete :destroy, namespace_id: project.namespace.id, project_id: project.id
+      delete :destroy, params: { namespace_id: project.namespace.id, project_id: project.id }
 
       expect(project.avatar.present?).to be_falsey
       expect(project).to be_valid
diff --git a/spec/controllers/projects/badges_controller_spec.rb b/spec/controllers/projects/badges_controller_spec.rb
index dfe34171b558c7fbeeb3f045aeeeb9c04f8d7809..2556bc3ae50a0529391092f6045c7614158052fa 100644
--- a/spec/controllers/projects/badges_controller_spec.rb
+++ b/spec/controllers/projects/badges_controller_spec.rb
@@ -23,6 +23,6 @@
   end
 
   def get_badge(badge)
-    get badge, namespace_id: project.namespace.to_param, project_id: project, ref: pipeline.ref, format: :svg
+    get badge, params: { namespace_id: project.namespace.to_param, project_id: project, ref: pipeline.ref }, format: :svg
   end
 end
diff --git a/spec/controllers/projects/blame_controller_spec.rb b/spec/controllers/projects/blame_controller_spec.rb
index fe4c48637174947b6f0ff46d6aa2c217f060fe62..eb110ea0002f4d5d714d44ee829f7009578fda6c 100644
--- a/spec/controllers/projects/blame_controller_spec.rb
+++ b/spec/controllers/projects/blame_controller_spec.rb
@@ -16,9 +16,11 @@
 
     before do
       get(:show,
-          namespace_id: project.namespace,
-          project_id: project,
-          id: id)
+          params: {
+            namespace_id: project.namespace,
+            project_id: project,
+            id: id
+          })
     end
 
     context "valid file" do
diff --git a/spec/controllers/projects/blob_controller_spec.rb b/spec/controllers/projects/blob_controller_spec.rb
index 9fc6af6a04543856ec1103170d8e6c809c2fa908..38957e96798da2946bb803566533b807bd2ca5a6 100644
--- a/spec/controllers/projects/blob_controller_spec.rb
+++ b/spec/controllers/projects/blob_controller_spec.rb
@@ -11,9 +11,11 @@
     context 'with file path' do
       before do
         get(:show,
-            namespace_id: project.namespace,
-            project_id: project,
-            id: id)
+            params: {
+              namespace_id: project.namespace,
+              project_id: project,
+              id: id
+            })
       end
 
       context "valid branch, valid file" do
@@ -48,9 +50,11 @@
 
         before do
           get(:show,
-              namespace_id: project.namespace,
-              project_id: project,
-              id: id,
+              params: {
+                namespace_id: project.namespace,
+                project_id: project,
+                id: id
+              },
               format: :json)
         end
 
@@ -66,11 +70,13 @@
 
         before do
           get(:show,
-              namespace_id: project.namespace,
-              project_id: project,
-              id: id,
-              format: :json,
-              viewer: 'none')
+              params: {
+                namespace_id: project.namespace,
+                project_id: project,
+                id: id,
+                viewer: 'none'
+              },
+              format: :json)
         end
 
         it do
@@ -84,9 +90,11 @@
     context 'with tree path' do
       before do
         get(:show,
-            namespace_id: project.namespace,
-            project_id: project,
-            id: id)
+            params: {
+              namespace_id: project.namespace,
+              project_id: project,
+              id: id
+            })
         controller.instance_variable_set(:@blob, nil)
       end
 
@@ -109,7 +117,7 @@ def do_get(opts = {})
       params = { namespace_id: project.namespace,
                  project_id: project,
                  id: 'master/CHANGELOG' }
-      get :diff, params.merge(opts)
+      get :diff, params: params.merge(opts)
     end
 
     before do
@@ -200,7 +208,7 @@ def do_get(opts = {})
 
     context 'anonymous' do
       before do
-        get :edit, default_params
+        get :edit, params: default_params
       end
 
       it 'redirects to sign in and returns' do
@@ -213,7 +221,7 @@ def do_get(opts = {})
 
       before do
         sign_in(guest)
-        get :edit, default_params
+        get :edit, params: default_params
       end
 
       it 'redirects to blob show' do
@@ -227,7 +235,7 @@ def do_get(opts = {})
       before do
         project.add_developer(developer)
         sign_in(developer)
-        get :edit, default_params
+        get :edit, params: default_params
       end
 
       it 'redirects to blob show' do
@@ -241,7 +249,7 @@ def do_get(opts = {})
       before do
         project.add_maintainer(maintainer)
         sign_in(maintainer)
-        get :edit, default_params
+        get :edit, params: default_params
       end
 
       it 'redirects to blob show' do
@@ -274,7 +282,7 @@ def blob_after_edit_path
     end
 
     it 'redirects to blob' do
-      put :update, default_params
+      put :update, params: default_params
 
       expect(response).to redirect_to(blob_after_edit_path)
     end
@@ -284,7 +292,7 @@ def blob_after_edit_path
       let(:mr_params) { default_params.merge(from_merge_request_iid: merge_request.iid) }
 
       it 'redirects to MR diff' do
-        put :update, mr_params
+        put :update, params: mr_params
 
         after_edit_path = diffs_project_merge_request_path(project, merge_request)
         file_anchor = "##{Digest::SHA1.hexdigest('CHANGELOG')}"
@@ -298,7 +306,7 @@ def blob_after_edit_path
         end
 
         it "it redirect to blob" do
-          put :update, mr_params
+          put :update, params: mr_params
 
           expect(response).to redirect_to(blob_after_edit_path)
         end
@@ -320,7 +328,7 @@ def blob_after_edit_path
         end
 
         it 'redirects to blob' do
-          put :update, default_params
+          put :update, params: default_params
 
           expect(response).to redirect_to(project_blob_path(forked_project, 'master/CHANGELOG'))
         end
@@ -331,7 +339,7 @@ def blob_after_edit_path
           default_params[:branch_name] = "fork-test-1"
           default_params[:create_merge_request] = 1
 
-          put :update, default_params
+          put :update, params: default_params
 
           expect(response).to redirect_to(
             project_new_merge_request_path(
@@ -374,7 +382,7 @@ def blob_after_edit_path
       let(:after_delete_path) { project_tree_path(project, 'master/files') }
 
       it 'redirects to the sub directory' do
-        delete :destroy, default_params
+        delete :destroy, params: default_params
 
         expect(response).to redirect_to(after_delete_path)
       end
@@ -393,7 +401,7 @@ def blob_after_edit_path
       end
 
       it 'redirects to the project root' do
-        delete :destroy, default_params
+        delete :destroy, params: default_params
 
         expect(response).to redirect_to(project_root_path)
       end
@@ -413,7 +421,7 @@ def blob_after_edit_path
         let(:after_delete_path) { project_tree_path(project, 'binary-encoding') }
 
         it 'redirects to the project root of the branch' do
-          delete :destroy, default_params
+          delete :destroy, params: default_params
 
           expect(response).to redirect_to(after_delete_path)
         end
diff --git a/spec/controllers/projects/boards_controller_spec.rb b/spec/controllers/projects/boards_controller_spec.rb
index 8d503f6ad3232c3dd93888fbef883cc1763de97a..09199067024c785f0e99cd75dbab912465229a79 100644
--- a/spec/controllers/projects/boards_controller_spec.rb
+++ b/spec/controllers/projects/boards_controller_spec.rb
@@ -121,8 +121,10 @@
     end
 
     def list_boards(format: :html)
-      get :index, namespace_id: project.namespace,
-                  project_id: project,
+      get :index, params: {
+                    namespace_id: project.namespace,
+                    project_id: project
+                  },
                   format: format
     end
   end
@@ -207,9 +209,11 @@ def list_boards(format: :html)
     end
 
     def read_board(board:, format: :html)
-      get :show, namespace_id: project.namespace,
-                 project_id: project,
-                 id: board.to_param,
+      get :show, params: {
+                   namespace_id: project.namespace,
+                   project_id: project,
+                   id: board.to_param
+                 },
                  format: format
     end
   end
diff --git a/spec/controllers/projects/branches_controller_spec.rb b/spec/controllers/projects/branches_controller_spec.rb
index 31471cde42084fcc2026086c2b655a351758c5b8..02b3d5269a610b75c766390055d6a76751e8de41 100644
--- a/spec/controllers/projects/branches_controller_spec.rb
+++ b/spec/controllers/projects/branches_controller_spec.rb
@@ -22,10 +22,12 @@
         sign_in(user)
 
         post :create,
-          namespace_id: project.namespace,
-          project_id: project,
-          branch_name: branch,
-          ref: ref
+             params: {
+               namespace_id: project.namespace,
+               project_id: project,
+               branch_name: branch,
+               ref: ref
+             }
       end
 
       context "valid branch name, valid source" do
@@ -76,10 +78,12 @@
 
       it 'redirects' do
         post :create,
-          namespace_id: project.namespace,
-          project_id: project,
-          branch_name: branch,
-          issue_iid: issue.iid
+             params: {
+               namespace_id: project.namespace,
+               project_id: project,
+               branch_name: branch,
+               issue_iid: issue.iid
+             }
 
         expect(subject)
           .to redirect_to("/#{project.full_path}/tree/1-feature-branch")
@@ -89,10 +93,12 @@
         expect(SystemNoteService).to receive(:new_issue_branch).with(issue, project, user, "1-feature-branch")
 
         post :create,
-          namespace_id: project.namespace,
-          project_id: project,
-          branch_name: branch,
-          issue_iid: issue.iid
+             params: {
+               namespace_id: project.namespace,
+               project_id: project,
+               branch_name: branch,
+               issue_iid: issue.iid
+             }
       end
 
       context 'repository-less project' do
@@ -105,10 +111,12 @@
           expect(SystemNoteService).to receive(:new_issue_branch).and_return(true)
 
           post :create,
-            namespace_id: project.namespace.to_param,
-            project_id: project.to_param,
-            branch_name: branch,
-            issue_iid: issue.iid
+               params: {
+                 namespace_id: project.namespace.to_param,
+                 project_id: project.to_param,
+                 branch_name: branch,
+                 issue_iid: issue.iid
+               }
 
           expect(response).to redirect_to project_tree_path(project, branch)
         end
@@ -121,10 +129,12 @@
             expect(SystemNoteService).to receive(:new_issue_branch).and_return(true)
 
             post :create,
-              namespace_id: project.namespace.to_param,
-              project_id: project.to_param,
-              branch_name: branch,
-              issue_iid: issue.iid
+                 params: {
+                   namespace_id: project.namespace.to_param,
+                   project_id: project.to_param,
+                   branch_name: branch,
+                   issue_iid: issue.iid
+                 }
 
             expect(response.location).to include(project_new_blob_path(project, branch))
             expect(response).to have_gitlab_http_status(302)
@@ -156,10 +166,12 @@
           expect(SystemNoteService).to receive(:new_issue_branch).and_return(true)
 
           post :create,
-            namespace_id: project.namespace.to_param,
-            project_id: project.to_param,
-            branch_name: branch,
-            issue_iid: issue.iid
+               params: {
+                namespace_id: project.namespace.to_param,
+                project_id: project.to_param,
+                branch_name: branch,
+                issue_iid: issue.iid
+               }
 
           expect(response.location).to include(project_new_blob_path(project, branch))
           expect(response).to have_gitlab_http_status(302)
@@ -173,10 +185,12 @@
           expect(SystemNoteService).not_to receive(:new_issue_branch)
 
           post :create,
-            namespace_id: project.namespace,
-            project_id: project,
-            branch_name: branch,
-            issue_iid: issue.iid
+               params: {
+                namespace_id: project.namespace,
+                project_id: project,
+                branch_name: branch,
+                issue_iid: issue.iid
+               }
         end
       end
 
@@ -191,10 +205,12 @@
           expect(SystemNoteService).not_to receive(:new_issue_branch)
 
           post :create,
-            namespace_id: project.namespace,
-            project_id: project,
-            branch_name: branch,
-            issue_iid: issue.iid
+               params: {
+                namespace_id: project.namespace,
+                project_id: project,
+                branch_name: branch,
+                issue_iid: issue.iid
+               }
         end
       end
     end
@@ -228,11 +244,14 @@
     end
 
     def create_branch(name:, ref:)
-      post :create, namespace_id: project.namespace.to_param,
-                    project_id: project.to_param,
-                    branch_name: name,
-                    ref: ref,
-                    format: :json
+      post :create,
+           format: :json,
+           params: {
+             namespace_id: project.namespace.to_param,
+             project_id: project.to_param,
+             branch_name: name,
+             ref: ref
+           }
     end
   end
 
@@ -246,9 +265,11 @@ def create_branch(name:, ref:)
     it 'returns 303' do
       post :destroy,
            format: :html,
-           id: 'foo/bar/baz',
-           namespace_id: project.namespace,
-           project_id: project
+           params: {
+             id: 'foo/bar/baz',
+             namespace_id: project.namespace,
+             project_id: project
+           }
 
       expect(response).to have_gitlab_http_status(303)
     end
@@ -261,10 +282,12 @@ def create_branch(name:, ref:)
       sign_in(user)
 
       post :destroy,
-        format: format,
-        id: branch,
-        namespace_id: project.namespace,
-        project_id: project
+           format: format,
+           params: {
+             id: branch,
+             namespace_id: project.namespace,
+             project_id: project
+           }
     end
 
     context 'as JS' do
@@ -359,8 +382,10 @@ def create_branch(name:, ref:)
   describe "DELETE destroy_all_merged" do
     def destroy_all_merged
       delete :destroy_all_merged,
-             namespace_id: project.namespace,
-             project_id: project
+             params: {
+               namespace_id: project.namespace,
+               project_id: project
+             }
     end
 
     context 'when user is allowed to push' do
@@ -404,10 +429,12 @@ def destroy_all_merged
     context 'when rendering a JSON format' do
       it 'filters branches by name' do
         get :index,
-            namespace_id: project.namespace,
-            project_id: project,
             format: :json,
-            search: 'master'
+            params: {
+              namespace_id: project.namespace,
+              project_id: project,
+              search: 'master'
+            }
 
         parsed_response = JSON.parse(response.body)
 
@@ -423,10 +450,12 @@ def destroy_all_merged
     context 'when cache is enabled yet cold', :request_store do
       it 'return with a status 200' do
         get :index,
-            namespace_id: project.namespace,
-            project_id: project,
-            state: 'all',
-            format: :html
+            format: :html,
+            params: {
+              namespace_id: project.namespace,
+              project_id: project,
+              state: 'all'
+            }
 
         expect(response).to have_gitlab_http_status(200)
       end
@@ -439,10 +468,12 @@ def destroy_all_merged
 
       it 'return with a status 200' do
         get :index,
-            namespace_id: project.namespace,
-            project_id: project,
-            state: 'all',
-            format: :html
+            format: :html,
+            params: {
+              namespace_id: project.namespace,
+              project_id: project,
+              state: 'all'
+            }
 
         expect(response).to have_gitlab_http_status(200)
       end
@@ -451,30 +482,36 @@ def destroy_all_merged
     context 'when deprecated sort/search/page parameters are specified' do
       it 'returns with a status 301 when sort specified' do
         get :index,
-            namespace_id: project.namespace,
-            project_id: project,
-            sort: 'updated_asc',
-            format: :html
+            format: :html,
+            params: {
+              namespace_id: project.namespace,
+              project_id: project,
+              sort: 'updated_asc'
+            }
 
         expect(response).to redirect_to project_branches_filtered_path(project, state: 'all')
       end
 
       it 'returns with a status 301 when search specified' do
         get :index,
-            namespace_id: project.namespace,
-            project_id: project,
-            search: 'feature',
-            format: :html
+            format: :html,
+            params: {
+              namespace_id: project.namespace,
+              project_id: project,
+              search: 'feature'
+            }
 
         expect(response).to redirect_to project_branches_filtered_path(project, state: 'all')
       end
 
       it 'returns with a status 301 when page specified' do
         get :index,
-            namespace_id: project.namespace,
-            project_id: project,
-            page: 2,
-            format: :html
+            format: :html,
+            params: {
+              namespace_id: project.namespace,
+              project_id: project,
+              page: 2
+            }
 
         expect(response).to redirect_to project_branches_filtered_path(project, state: 'all')
       end
diff --git a/spec/controllers/projects/ci/lints_controller_spec.rb b/spec/controllers/projects/ci/lints_controller_spec.rb
index 1249a5528a9b7833c3052b5cb824f831f54bc02d..82c1374aa4fe8e52c2e53ddb7e3dc46e8d3e039f 100644
--- a/spec/controllers/projects/ci/lints_controller_spec.rb
+++ b/spec/controllers/projects/ci/lints_controller_spec.rb
@@ -13,7 +13,7 @@
       before do
         project.add_developer(user)
 
-        get :show, namespace_id: project.namespace, project_id: project
+        get :show, params: { namespace_id: project.namespace, project_id: project }
       end
 
       it 'should be success' do
@@ -33,7 +33,7 @@
       before do
         project.add_guest(user)
 
-        get :show, namespace_id: project.namespace, project_id: project
+        get :show, params: { namespace_id: project.namespace, project_id: project }
       end
 
       it 'should respond with 404' do
@@ -72,7 +72,7 @@
         WebMock.stub_request(:get, remote_file_path).to_return(body: remote_file_content)
         project.add_developer(user)
 
-        post :create, namespace_id: project.namespace, project_id: project, content: content
+        post :create, params: { namespace_id: project.namespace, project_id: project, content: content }
       end
 
       it 'should be success' do
@@ -100,7 +100,7 @@
       before do
         project.add_developer(user)
 
-        post :create, namespace_id: project.namespace, project_id: project, content: content
+        post :create, params: { namespace_id: project.namespace, project_id: project, content: content }
       end
 
       it 'should assign errors' do
@@ -112,7 +112,7 @@
       before do
         project.add_guest(user)
 
-        post :create, namespace_id: project.namespace, project_id: project, content: content
+        post :create, params: { namespace_id: project.namespace, project_id: project, content: content }
       end
 
       it 'should respond with 404' do
diff --git a/spec/controllers/projects/clusters/applications_controller_spec.rb b/spec/controllers/projects/clusters/applications_controller_spec.rb
index 8106453a7752c3a2901b9d574f5445d6c2eea22d..cb5582592259f0bb3070266352260e9c9adda40a 100644
--- a/spec/controllers/projects/clusters/applications_controller_spec.rb
+++ b/spec/controllers/projects/clusters/applications_controller_spec.rb
@@ -81,7 +81,7 @@ def current_application
     end
 
     def go
-      post :create, params.merge(namespace_id: project.namespace, project_id: project)
+      post :create, params: params.merge(namespace_id: project.namespace, project_id: project)
     end
   end
 end
diff --git a/spec/controllers/projects/clusters_controller_spec.rb b/spec/controllers/projects/clusters_controller_spec.rb
index 483222363bbe8b83d3587aabd23dfea956d05999..ea26638444698966ee1c35c6d4b72eec082746ea 100644
--- a/spec/controllers/projects/clusters_controller_spec.rb
+++ b/spec/controllers/projects/clusters_controller_spec.rb
@@ -18,7 +18,7 @@
 
   describe 'GET index' do
     def go(params = {})
-      get :index, params.reverse_merge(namespace_id: project.namespace.to_param, project_id: project)
+      get :index, params: params.reverse_merge(namespace_id: project.namespace.to_param, project_id: project)
     end
 
     describe 'functionality' do
@@ -80,7 +80,7 @@ def go(params = {})
 
   describe 'GET new' do
     def go
-      get :new, namespace_id: project.namespace, project_id: project
+      get :new, params: { namespace_id: project.namespace, project_id: project }
     end
 
     describe 'functionality for new cluster' do
@@ -174,7 +174,7 @@ def go
     end
 
     def go
-      post :create_gcp, params.merge(namespace_id: project.namespace, project_id: project)
+      post :create_gcp, params: params.merge(namespace_id: project.namespace, project_id: project)
     end
 
     describe 'functionality' do
@@ -261,7 +261,7 @@ def go
     end
 
     def go
-      post :create_user, params.merge(namespace_id: project.namespace, project_id: project)
+      post :create_user, params: params.merge(namespace_id: project.namespace, project_id: project)
     end
 
     describe 'functionality' do
@@ -331,9 +331,11 @@ def go
 
     def go
       get :cluster_status,
-        namespace_id: project.namespace.to_param,
-        project_id: project.to_param,
-        id: cluster,
+        params: {
+          namespace_id: project.namespace.to_param,
+          project_id: project.to_param,
+          id: cluster
+        },
         format: :json
     end
 
@@ -369,9 +371,11 @@ def go
 
     def go
       get :show,
-        namespace_id: project.namespace,
-        project_id: project,
-        id: cluster
+        params: {
+          namespace_id: project.namespace,
+          project_id: project,
+          id: cluster
+        }
     end
 
     describe 'functionality' do
@@ -397,11 +401,11 @@ def go
 
   describe 'PUT update' do
     def go(format: :html)
-      put :update, params.merge(namespace_id: project.namespace.to_param,
-                                project_id: project.to_param,
-                                id: cluster,
-                                format: format
-                               )
+      put :update, params: params.merge(namespace_id: project.namespace.to_param,
+                                        project_id: project.to_param,
+                                        id: cluster,
+                                        format: format
+                                       )
     end
 
     before do
@@ -500,9 +504,11 @@ def go(format: :html)
 
     def go
       delete :destroy,
-        namespace_id: project.namespace,
-        project_id: project,
-        id: cluster
+        params: {
+          namespace_id: project.namespace,
+          project_id: project,
+          id: cluster
+        }
     end
 
     describe 'functionality' do
diff --git a/spec/controllers/projects/commit_controller_spec.rb b/spec/controllers/projects/commit_controller_spec.rb
index e34fdee62d6f2354c428f41b6c39053fe4ae28b3..26eec90da068f6ac39943614d1395cd716b6334a 100644
--- a/spec/controllers/projects/commit_controller_spec.rb
+++ b/spec/controllers/projects/commit_controller_spec.rb
@@ -21,7 +21,7 @@ def go(extra_params = {})
         project_id: project
       }
 
-      get :show, params.merge(extra_params)
+      get :show, params: params.merge(extra_params)
     end
 
     context 'with valid id' do
@@ -102,9 +102,11 @@ def go(extra_params = {})
 
       it 'renders it' do
         get(:show,
-            namespace_id: fork_project.namespace,
-            project_id: fork_project,
-            id: commit.id)
+            params: {
+              namespace_id: fork_project.namespace,
+              project_id: fork_project,
+              id: commit.id
+            })
 
         expect(response).to be_success
       end
@@ -132,9 +134,11 @@ def go(extra_params = {})
       commit = project.commit('5937ac0a7beb003549fc5fd26fc247adbce4a52e')
 
       get(:branches,
-          namespace_id: project.namespace,
-          project_id: project,
-          id: commit.id)
+          params: {
+            namespace_id: project.namespace,
+            project_id: project,
+            id: commit.id
+          })
 
       expect(assigns(:branches)).to include('master', 'feature_conflict')
       expect(assigns(:branches_limit_exceeded)).to be_falsey
@@ -148,9 +152,11 @@ def go(extra_params = {})
       allow_any_instance_of(Repository).to receive(:tag_count).and_return(1001)
 
       get(:branches,
-          namespace_id: project.namespace,
-          project_id: project,
-          id: commit.id)
+          params: {
+            namespace_id: project.namespace,
+            project_id: project,
+            id: commit.id
+          })
 
       expect(assigns(:branches)).to eq([])
       expect(assigns(:branches_limit_exceeded)).to be_truthy
@@ -163,9 +169,11 @@ def go(extra_params = {})
     context 'when target branch is not provided' do
       it 'renders the 404 page' do
         post(:revert,
-            namespace_id: project.namespace,
-            project_id: project,
-            id: commit.id)
+            params: {
+              namespace_id: project.namespace,
+              project_id: project,
+              id: commit.id
+            })
 
         expect(response).not_to be_success
         expect(response).to have_gitlab_http_status(404)
@@ -175,10 +183,12 @@ def go(extra_params = {})
     context 'when the revert was successful' do
       it 'redirects to the commits page' do
         post(:revert,
-            namespace_id: project.namespace,
-            project_id: project,
-            start_branch: 'master',
-            id: commit.id)
+            params: {
+              namespace_id: project.namespace,
+              project_id: project,
+              start_branch: 'master',
+              id: commit.id
+            })
 
         expect(response).to redirect_to project_commits_path(project, 'master')
         expect(flash[:notice]).to eq('The commit has been successfully reverted.')
@@ -188,19 +198,23 @@ def go(extra_params = {})
     context 'when the revert failed' do
       before do
         post(:revert,
-            namespace_id: project.namespace,
-            project_id: project,
-            start_branch: 'master',
-            id: commit.id)
+            params: {
+              namespace_id: project.namespace,
+              project_id: project,
+              start_branch: 'master',
+              id: commit.id
+            })
       end
 
       it 'redirects to the commit page' do
         # Reverting a commit that has been already reverted.
         post(:revert,
-            namespace_id: project.namespace,
-            project_id: project,
-            start_branch: 'master',
-            id: commit.id)
+            params: {
+              namespace_id: project.namespace,
+              project_id: project,
+              start_branch: 'master',
+              id: commit.id
+            })
 
         expect(response).to redirect_to project_commit_path(project, commit.id)
         expect(flash[:alert]).to match('Sorry, we cannot revert this commit automatically.')
@@ -212,9 +226,11 @@ def go(extra_params = {})
     context 'when target branch is not provided' do
       it 'renders the 404 page' do
         post(:cherry_pick,
-            namespace_id: project.namespace,
-            project_id: project,
-            id: master_pickable_commit.id)
+            params: {
+              namespace_id: project.namespace,
+              project_id: project,
+              id: master_pickable_commit.id
+            })
 
         expect(response).not_to be_success
         expect(response).to have_gitlab_http_status(404)
@@ -224,10 +240,12 @@ def go(extra_params = {})
     context 'when the cherry-pick was successful' do
       it 'redirects to the commits page' do
         post(:cherry_pick,
-            namespace_id: project.namespace,
-            project_id: project,
-            start_branch: 'master',
-            id: master_pickable_commit.id)
+            params: {
+              namespace_id: project.namespace,
+              project_id: project,
+              start_branch: 'master',
+              id: master_pickable_commit.id
+            })
 
         expect(response).to redirect_to project_commits_path(project, 'master')
         expect(flash[:notice]).to eq('The commit has been successfully cherry-picked into master.')
@@ -237,19 +255,23 @@ def go(extra_params = {})
     context 'when the cherry_pick failed' do
       before do
         post(:cherry_pick,
-            namespace_id: project.namespace,
-            project_id: project,
-            start_branch: 'master',
-            id: master_pickable_commit.id)
+            params: {
+              namespace_id: project.namespace,
+              project_id: project,
+              start_branch: 'master',
+              id: master_pickable_commit.id
+            })
       end
 
       it 'redirects to the commit page' do
         # Cherry-picking a commit that has been already cherry-picked.
         post(:cherry_pick,
-            namespace_id: project.namespace,
-            project_id: project,
-            start_branch: 'master',
-            id: master_pickable_commit.id)
+            params: {
+              namespace_id: project.namespace,
+              project_id: project,
+              start_branch: 'master',
+              id: master_pickable_commit.id
+            })
 
         expect(response).to redirect_to project_commit_path(project, master_pickable_commit.id)
         expect(flash[:alert]).to match('Sorry, we cannot cherry-pick this commit automatically.')
@@ -264,7 +286,7 @@ def diff_for_path(extra_params = {})
         project_id: project
       }
 
-      get :diff_for_path, params.merge(extra_params)
+      get :diff_for_path, params: params.merge(extra_params)
     end
 
     let(:existing_path) { '.gitmodules' }
@@ -332,7 +354,7 @@ def get_pipelines(extra_params = {})
         project_id: project
       }
 
-      get :pipelines, params.merge(extra_params)
+      get :pipelines, params: params.merge(extra_params)
     end
 
     context 'when the commit exists' do
diff --git a/spec/controllers/projects/commits_controller_spec.rb b/spec/controllers/projects/commits_controller_spec.rb
index 805136506367a6616e45bc7039f691064e1f475f..8cb9130b834c1128c22251f079742a0ac04feed4 100644
--- a/spec/controllers/projects/commits_controller_spec.rb
+++ b/spec/controllers/projects/commits_controller_spec.rb
@@ -17,8 +17,10 @@
       context "no ref is provided" do
         it 'should redirect to the default branch of the project' do
           get(:commits_root,
-              namespace_id: project.namespace,
-              project_id: project)
+              params: {
+                namespace_id: project.namespace,
+                project_id: project
+              })
 
           expect(response).to redirect_to project_commits_path(project)
         end
@@ -31,9 +33,11 @@
       context 'with file path' do
         before do
           get(:show,
-              namespace_id: project.namespace,
-              project_id: project,
-              id: id)
+              params: {
+                namespace_id: project.namespace,
+                project_id: project,
+                id: id
+              })
         end
 
         context "valid branch, valid file" do
@@ -65,9 +69,11 @@
         context "when the ref does not exist with the suffix" do
           before do
             get(:show,
-                namespace_id: project.namespace,
-                project_id: project,
-                id: "master.atom")
+                params: {
+                  namespace_id: project.namespace,
+                  project_id: project,
+                  id: "master.atom"
+                })
           end
 
           it "renders as atom" do
@@ -88,9 +94,11 @@
             allow_any_instance_of(Repository).to receive(:commit).with('master.atom').and_return(commit)
 
             get(:show,
-                namespace_id: project.namespace,
-                project_id: project,
-                id: "master.atom")
+                params: {
+                  namespace_id: project.namespace,
+                  project_id: project,
+                  id: "master.atom"
+                })
           end
 
           it "renders as HTML" do
@@ -106,9 +114,11 @@
 
       before do
         get(:signatures,
-            namespace_id: project.namespace,
-            project_id: project,
-            id: id,
+            params: {
+              namespace_id: project.namespace,
+              project_id: project,
+              id: id
+            },
             format: :json)
       end
 
diff --git a/spec/controllers/projects/compare_controller_spec.rb b/spec/controllers/projects/compare_controller_spec.rb
index 17883d0fadd11845dc6e29cdc2169a10eac497e2..cfd70e93efbf87c7e3d33577ced9d2d928cb7160 100644
--- a/spec/controllers/projects/compare_controller_spec.rb
+++ b/spec/controllers/projects/compare_controller_spec.rb
@@ -13,7 +13,7 @@
     render_views
 
     before do
-      get :index, namespace_id: project.namespace, project_id: project
+      get :index, params: { namespace_id: project.namespace, project_id: project }
     end
 
     it 'returns successfully' do
@@ -24,7 +24,7 @@
   describe 'GET show' do
     render_views
 
-    subject(:show_request) { get :show, request_params }
+    subject(:show_request) { get :show, params: request_params }
 
     let(:request_params) do
       {
@@ -130,7 +130,7 @@ def diff_for_path(extra_params = {})
         project_id: project
       }
 
-      get :diff_for_path, params.merge(extra_params)
+      get :diff_for_path, params: params.merge(extra_params)
     end
 
     let(:existing_path) { 'files/ruby/feature.rb' }
@@ -201,7 +201,7 @@ def diff_for_path(extra_params = {})
   end
 
   describe 'POST create' do
-    subject(:create_request) { post :create, request_params }
+    subject(:create_request) { post :create, params: request_params }
 
     let(:request_params) do
       {
@@ -260,7 +260,7 @@ def diff_for_path(extra_params = {})
   end
 
   describe 'GET signatures' do
-    subject(:signatures_request) { get :signatures, request_params }
+    subject(:signatures_request) { get :signatures, params: request_params }
 
     let(:request_params) do
       {
diff --git a/spec/controllers/projects/cycle_analytics_controller_spec.rb b/spec/controllers/projects/cycle_analytics_controller_spec.rb
index 5c79269e8f1a6732bed588de361468806646193d..6a63cbdf8e268ae1e850780710bcbf013894c346 100644
--- a/spec/controllers/projects/cycle_analytics_controller_spec.rb
+++ b/spec/controllers/projects/cycle_analytics_controller_spec.rb
@@ -13,8 +13,10 @@
     context 'with no data' do
       it 'is true' do
         get(:show,
-            namespace_id: project.namespace,
-            project_id: project)
+            params: {
+              namespace_id: project.namespace,
+              project_id: project
+            })
 
         expect(response).to be_success
         expect(assigns(:cycle_analytics_no_data)).to eq(true)
@@ -32,8 +34,10 @@
 
       it 'is false' do
         get(:show,
-            namespace_id: project.namespace,
-            project_id: project)
+            params: {
+              namespace_id: project.namespace,
+              project_id: project
+            })
 
         expect(response).to be_success
         expect(assigns(:cycle_analytics_no_data)).to eq(false)
diff --git a/spec/controllers/projects/deploy_keys_controller_spec.rb b/spec/controllers/projects/deploy_keys_controller_spec.rb
index dc34fbcb785b6222ab876d2026f3ca252ad52349..fd9f8bf9d0c58fba6555b841cf527fefcfd8669e 100644
--- a/spec/controllers/projects/deploy_keys_controller_spec.rb
+++ b/spec/controllers/projects/deploy_keys_controller_spec.rb
@@ -17,7 +17,7 @@
 
     context 'when html requested' do
       it 'redirects to blob' do
-        get :index, params
+        get :index, params: params
 
         expect(response).to redirect_to(project_settings_repository_path(project, anchor: 'js-deploy-keys-settings'))
       end
@@ -48,7 +48,7 @@
       end
 
       it 'returns json in a correct format' do
-        get :index, params.merge(format: :json)
+        get :index, params: params.merge(format: :json)
 
         json = JSON.parse(response.body)
 
@@ -74,7 +74,7 @@
 
       it 'redirects to login' do
         expect do
-          put :enable, id: deploy_key.id, namespace_id: project.namespace, project_id: project
+          put :enable, params: { id: deploy_key.id, namespace_id: project.namespace, project_id: project }
         end.not_to change { DeployKeysProject.count }
 
         expect(response).to have_http_status(302)
@@ -89,7 +89,7 @@
 
       it 'returns 404' do
         expect do
-          put :enable, id: deploy_key.id, namespace_id: project.namespace, project_id: project
+          put :enable, params: { id: deploy_key.id, namespace_id: project.namespace, project_id: project }
         end.not_to change { DeployKeysProject.count }
 
         expect(response).to have_http_status(404)
@@ -103,7 +103,7 @@
 
       it 'returns 302' do
         expect do
-          put :enable, id: deploy_key.id, namespace_id: project.namespace, project_id: project
+          put :enable, params: { id: deploy_key.id, namespace_id: project.namespace, project_id: project }
         end.to change { DeployKeysProject.count }.by(1)
 
         expect(DeployKeysProject.where(project_id: project.id, deploy_key_id: deploy_key.id).count).to eq(1)
@@ -112,7 +112,7 @@
       end
 
       it 'returns 404' do
-        put :enable, id: 0, namespace_id: project.namespace, project_id: project
+        put :enable, params: { id: 0, namespace_id: project.namespace, project_id: project }
 
         expect(response).to have_http_status(404)
       end
@@ -125,7 +125,7 @@
 
       it 'returns 302' do
         expect do
-          put :enable, id: deploy_key.id, namespace_id: project.namespace, project_id: project
+          put :enable, params: { id: deploy_key.id, namespace_id: project.namespace, project_id: project }
         end.to change { DeployKeysProject.count }.by(1)
            .and change { AuditEvent.count }.by(1) ## EE only
 
@@ -146,7 +146,7 @@
       end
 
       it 'redirects to login' do
-        put :disable, id: deploy_key.id, namespace_id: project.namespace, project_id: project
+        put :disable, params: { id: deploy_key.id, namespace_id: project.namespace, project_id: project }
 
         expect(response).to have_http_status(302)
         expect(response).to redirect_to(new_user_session_path)
@@ -160,7 +160,7 @@
       end
 
       it 'returns 404' do
-        put :disable, id: deploy_key.id, namespace_id: project.namespace, project_id: project
+        put :disable, params: { id: deploy_key.id, namespace_id: project.namespace, project_id: project }
 
         expect(response).to have_http_status(404)
         expect(DeployKey.find(deploy_key.id)).to eq(deploy_key)
@@ -169,7 +169,7 @@
 
     context 'with user with permission' do
       it 'returns 302' do
-        put :disable, id: deploy_key.id, namespace_id: project.namespace, project_id: project
+        put :disable, params: { id: deploy_key.id, namespace_id: project.namespace, project_id: project }
 
         expect(response).to have_http_status(302)
         expect(response).to redirect_to(namespace_project_settings_repository_path(anchor: 'js-deploy-keys-settings'))
@@ -178,7 +178,7 @@
       end
 
       it 'returns 404' do
-        put :disable, id: 0, namespace_id: project.namespace, project_id: project
+        put :disable, params: { id: 0, namespace_id: project.namespace, project_id: project }
 
         expect(response).to have_http_status(404)
       end
@@ -191,7 +191,7 @@
 
       it 'returns 302' do
         expect do
-          put :disable, id: deploy_key.id, namespace_id: project.namespace, project_id: project
+          put :disable, params: { id: deploy_key.id, namespace_id: project.namespace, project_id: project }
         end.to change { DeployKey.count }.by(-1)
            .and change { AuditEvent.count }.by(1) ## EE only
 
diff --git a/spec/controllers/projects/deployments_controller_spec.rb b/spec/controllers/projects/deployments_controller_spec.rb
index 5b7da81b6a1d413bc15a83fa571cfa1c13d3d33b..5c33098fd315d642b2aeed3d4b24b9c0cacce2a1 100644
--- a/spec/controllers/projects/deployments_controller_spec.rb
+++ b/spec/controllers/projects/deployments_controller_spec.rb
@@ -19,7 +19,7 @@
       create(:deployment, :success, environment: environment, created_at: 7.hours.ago)
       create(:deployment, :success, environment: environment)
 
-      get :index, deployment_params(after: 8.hours.ago)
+      get :index, params: deployment_params(after: 8.hours.ago)
 
       expect(response).to be_ok
 
@@ -29,7 +29,7 @@
     it 'returns a list with deployments information' do
       create(:deployment, :success, environment: environment)
 
-      get :index, deployment_params
+      get :index, params: deployment_params
 
       expect(response).to be_ok
       expect(response).to match_response_schema('deployments')
@@ -49,7 +49,7 @@
       end
 
       it 'responds with not found' do
-        get :metrics, deployment_params(id: deployment.id)
+        get :metrics, params: deployment_params(id: deployment.id)
 
         expect(response).to be_not_found
       end
@@ -66,7 +66,7 @@
         end
 
         it 'returns a empty response 204 resposne' do
-          get :metrics, deployment_params(id: deployment.id)
+          get :metrics, params: deployment_params(id: deployment.id)
           expect(response).to have_gitlab_http_status(204)
           expect(response.body).to eq('')
         end
@@ -86,7 +86,7 @@
         end
 
         it 'returns a metrics JSON document' do
-          get :metrics, deployment_params(id: deployment.id)
+          get :metrics, params: deployment_params(id: deployment.id)
 
           expect(response).to be_ok
           expect(json_response['success']).to be(true)
@@ -101,7 +101,7 @@
         end
 
         it 'responds with not found' do
-          get :metrics, deployment_params(id: deployment.id)
+          get :metrics, params: deployment_params(id: deployment.id)
 
           expect(response).to be_not_found
         end
@@ -122,7 +122,7 @@
       end
 
       it 'responds with not found' do
-        get :metrics, deployment_params(id: deployment.id)
+        get :metrics, params: deployment_params(id: deployment.id)
 
         expect(response).to be_not_found
       end
@@ -141,7 +141,7 @@
         end
 
         it 'returns a empty response 204 response' do
-          get :additional_metrics, deployment_params(id: deployment.id, format: :json)
+          get :additional_metrics, params: deployment_params(id: deployment.id, format: :json)
           expect(response).to have_gitlab_http_status(204)
           expect(response.body).to eq('')
         end
@@ -161,7 +161,7 @@
         end
 
         it 'returns a metrics JSON document' do
-          get :additional_metrics, deployment_params(id: deployment.id, format: :json)
+          get :additional_metrics, params: deployment_params(id: deployment.id, format: :json)
 
           expect(response).to be_ok
           expect(json_response['success']).to be(true)
diff --git a/spec/controllers/projects/discussions_controller_spec.rb b/spec/controllers/projects/discussions_controller_spec.rb
index 4aa33dbbb015ace8ec66316fe82221a1b11a57eb..0b9f336cf13c9869949efd1284251e66659b9db7 100644
--- a/spec/controllers/projects/discussions_controller_spec.rb
+++ b/spec/controllers/projects/discussions_controller_spec.rb
@@ -23,7 +23,7 @@
 
     context 'when user is not authorized to read the MR' do
       it 'returns 404' do
-        get :show, request_params, format: :json
+        get :show, params: request_params, session: { format: :json }
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -35,7 +35,7 @@
       end
 
       it 'returns status 200' do
-        get :show, request_params, format: :json
+        get :show, params: request_params, session: { format: :json }
 
         expect(response).to have_gitlab_http_status(200)
       end
@@ -43,7 +43,7 @@
       it 'returns status 404 if MR does not exists' do
         merge_request.destroy!
 
-        get :show, request_params, format: :json
+        get :show, params: request_params, session: { format: :json }
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -56,7 +56,7 @@
       end
 
       it 'returns status 200' do
-        get :show, request_params, format: :json
+        get :show, params: request_params, session: { format: :json }
 
         expect(response).to have_gitlab_http_status(200)
       end
@@ -70,7 +70,7 @@
 
     context "when the user is not authorized to resolve the discussion" do
       it "returns status 404" do
-        post :resolve, request_params
+        post :resolve, params: request_params
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -87,7 +87,7 @@
         end
 
         it "returns status 404" do
-          post :resolve, request_params
+          post :resolve, params: request_params
 
           expect(response).to have_gitlab_http_status(404)
         end
@@ -95,7 +95,7 @@
 
       context "when the discussion is resolvable" do
         it "resolves the discussion" do
-          post :resolve, request_params
+          post :resolve, params: request_params
 
           expect(note.reload.discussion.resolved?).to be true
           expect(note.reload.discussion.resolved_by).to eq(user)
@@ -104,17 +104,17 @@
         it "sends notifications if all discussions are resolved" do
           expect_any_instance_of(MergeRequests::ResolvedDiscussionNotificationService).to receive(:execute).with(merge_request)
 
-          post :resolve, request_params
+          post :resolve, params: request_params
         end
 
         it "returns the name of the resolving user" do
-          post :resolve, request_params
+          post :resolve, params: request_params
 
           expect(JSON.parse(response.body)['resolved_by']['name']).to eq(user.name)
         end
 
         it "returns status 200" do
-          post :resolve, request_params
+          post :resolve, params: request_params
 
           expect(response).to have_gitlab_http_status(200)
         end
@@ -123,7 +123,7 @@
           expect_any_instance_of(DiscussionSerializer).to receive(:represent)
             .with(instance_of(Discussion), { context: instance_of(described_class), render_truncated_diff_lines: true })
 
-          post :resolve, request_params
+          post :resolve, params: request_params
         end
 
         context 'diff discussion' do
@@ -131,7 +131,7 @@
           let(:discussion) { note.discussion }
 
           it "returns truncated diff lines" do
-            post :resolve, request_params
+            post :resolve, params: request_params
 
             expect(JSON.parse(response.body)['truncated_diff_lines']).to be_present
           end
@@ -149,7 +149,7 @@
 
     context "when the user is not authorized to resolve the discussion" do
       it "returns status 404" do
-        delete :unresolve, request_params
+        delete :unresolve, params: request_params
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -166,7 +166,7 @@
         end
 
         it "returns status 404" do
-          delete :unresolve, request_params
+          delete :unresolve, params: request_params
 
           expect(response).to have_gitlab_http_status(404)
         end
@@ -174,13 +174,13 @@
 
       context "when the discussion is resolvable" do
         it "unresolves the discussion" do
-          delete :unresolve, request_params
+          delete :unresolve, params: request_params
 
           expect(note.reload.discussion.resolved?).to be false
         end
 
         it "returns status 200" do
-          delete :unresolve, request_params
+          delete :unresolve, params: request_params
 
           expect(response).to have_gitlab_http_status(200)
         end
@@ -194,7 +194,7 @@
             expect_any_instance_of(DiscussionSerializer).to receive(:represent)
               .with(instance_of(Discussion), { context: instance_of(described_class), render_truncated_diff_lines: true })
 
-            delete :unresolve, request_params
+            delete :unresolve, params: request_params
           end
         end
       end
diff --git a/spec/controllers/projects/environments_controller_spec.rb b/spec/controllers/projects/environments_controller_spec.rb
index 5fa0488014f6fcce13c6fc310393be531666b6c3..94fb85f217c74a7b0d17f350adbc6d2cc023005e 100644
--- a/spec/controllers/projects/environments_controller_spec.rb
+++ b/spec/controllers/projects/environments_controller_spec.rb
@@ -17,7 +17,7 @@
   describe 'GET index' do
     context 'when a request for the HTML is made' do
       it 'responds with status code 200' do
-        get :index, environment_params
+        get :index, params: environment_params
 
         expect(response).to have_gitlab_http_status(:ok)
       end
@@ -26,7 +26,7 @@
         expect_any_instance_of(Gitlab::EtagCaching::Store)
           .to receive(:touch).with(project_environments_path(project, format: :json))
 
-        get :index, environment_params
+        get :index, params: environment_params
       end
     end
 
@@ -49,7 +49,7 @@
 
       context 'when requesting available environments scope' do
         before do
-          get :index, environment_params(format: :json, scope: :available)
+          get :index, params: environment_params(format: :json, scope: :available)
         end
 
         it 'responds with a payload describing available environments' do
@@ -73,7 +73,7 @@
 
       context 'when requesting stopped environments scope' do
         before do
-          get :index, environment_params(format: :json, scope: :stopped)
+          get :index, params: environment_params(format: :json, scope: :stopped)
         end
 
         it 'responds with a payload describing stopped environments' do
@@ -103,9 +103,11 @@
 
     context 'when using default format' do
       it 'responds with HTML' do
-        get :folder, namespace_id: project.namespace,
-                     project_id: project,
-                     id: 'staging-1.0'
+        get :folder, params: {
+                       namespace_id: project.namespace,
+                       project_id: project,
+                       id: 'staging-1.0'
+                     }
 
         expect(response).to be_ok
         expect(response).to render_template 'folder'
@@ -114,9 +116,11 @@
 
     context 'when using JSON format' do
       it 'sorts the subfolders lexicographically' do
-        get :folder, namespace_id: project.namespace,
-                     project_id: project,
-                     id: 'staging-1.0',
+        get :folder, params: {
+                       namespace_id: project.namespace,
+                       project_id: project,
+                       id: 'staging-1.0'
+                     },
                      format: :json
 
         expect(response).to be_ok
@@ -132,7 +136,7 @@
   describe 'GET show' do
     context 'with valid id' do
       it 'responds with a status code 200' do
-        get :show, environment_params
+        get :show, params: environment_params
 
         expect(response).to be_ok
       end
@@ -142,7 +146,7 @@
       it 'responds with a status code 404' do
         params = environment_params
         params[:id] = 12345
-        get :show, params
+        get :show, params: params
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -151,7 +155,7 @@
 
   describe 'GET edit' do
     it 'responds with a status code 200' do
-      get :edit, environment_params
+      get :edit, params: environment_params
 
       expect(response).to be_ok
     end
@@ -160,7 +164,7 @@
   describe 'PATCH #update' do
     it 'responds with a 302' do
       patch_params = environment_params.merge(environment: { external_url: 'https://git.gitlab.com' })
-      patch :update, patch_params
+      patch :update, params: patch_params
 
       expect(response).to have_gitlab_http_status(302)
     end
@@ -171,7 +175,7 @@
       it 'returns 404' do
         allow_any_instance_of(Environment).to receive(:available?) { false }
 
-        patch :stop, environment_params(format: :json)
+        patch :stop, params: environment_params(format: :json)
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -184,7 +188,7 @@
         allow_any_instance_of(Environment)
           .to receive_messages(available?: true, stop_with_action!: action)
 
-        patch :stop, environment_params(format: :json)
+        patch :stop, params: environment_params(format: :json)
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response).to eq(
@@ -198,7 +202,7 @@
         allow_any_instance_of(Environment)
           .to receive_messages(available?: true, stop_with_action!: nil)
 
-        patch :stop, environment_params(format: :json)
+        patch :stop, params: environment_params(format: :json)
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response).to eq(
@@ -211,7 +215,7 @@
   describe 'GET #terminal' do
     context 'with valid id' do
       it 'responds with a status code 200' do
-        get :terminal, environment_params
+        get :terminal, params: environment_params
 
         expect(response).to have_gitlab_http_status(200)
       end
@@ -222,13 +226,13 @@
         expect_any_instance_of(defined?(EE) ? EE::Environment : Environment)
           .to receive(:terminals)
 
-        get :terminal, environment_params
+        get :terminal, params: environment_params
       end
     end
 
     context 'with invalid id' do
       it 'responds with a status code 404' do
-        get :terminal, environment_params(id: 666)
+        get :terminal, params: environment_params(id: 666)
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -254,7 +258,7 @@
             .with(:fake_terminal)
             .and_return(workhorse: :response)
 
-          get :terminal_websocket_authorize, environment_params
+          get :terminal_websocket_authorize, params: environment_params
 
           expect(response).to have_gitlab_http_status(200)
           expect(response.headers["Content-Type"]).to eq(Gitlab::Workhorse::INTERNAL_API_CONTENT_TYPE)
@@ -264,7 +268,7 @@
 
       context 'and invalid id' do
         it 'returns 404' do
-          get :terminal_websocket_authorize, environment_params(id: 666)
+          get :terminal_websocket_authorize, params: environment_params(id: 666)
 
           expect(response).to have_gitlab_http_status(404)
         end
@@ -275,7 +279,7 @@
       it 'aborts with an exception' do
         allow(Gitlab::Workhorse).to receive(:verify_api_request!).and_raise(JWT::DecodeError)
 
-        expect { get :terminal_websocket_authorize, environment_params }.to raise_error(JWT::DecodeError)
+        expect { get :terminal_websocket_authorize, params: environment_params }.to raise_error(JWT::DecodeError)
         # controller tests don't set the response status correctly. It's enough
         # to check that the action raised an exception
       end
@@ -288,13 +292,13 @@
     it 'redirects to environment if it exists' do
       environment = create(:environment, name: 'production', project: project)
 
-      get :metrics_redirect, namespace_id: project.namespace, project_id: project
+      get :metrics_redirect, params: { namespace_id: project.namespace, project_id: project }
 
       expect(response).to redirect_to(environment_metrics_path(environment))
     end
 
     it 'redirects to empty page if no environment exists' do
-      get :metrics_redirect, namespace_id: project.namespace, project_id: project
+      get :metrics_redirect, params: { namespace_id: project.namespace, project_id: project }
 
       expect(response).to be_ok
       expect(response).to render_template 'empty'
@@ -312,14 +316,14 @@
       end
 
       it 'returns a metrics page' do
-        get :metrics, environment_params
+        get :metrics, params: environment_params
 
         expect(response).to be_ok
       end
 
       context 'when requesting metrics as JSON' do
         it 'returns a metrics JSON document' do
-          get :metrics, environment_params(format: :json)
+          get :metrics, params: environment_params(format: :json)
 
           expect(response).to have_gitlab_http_status(204)
           expect(json_response).to eq({})
@@ -337,7 +341,7 @@
       end
 
       it 'returns a metrics JSON document' do
-        get :metrics, environment_params(format: :json)
+        get :metrics, params: environment_params(format: :json)
 
         expect(response).to be_ok
         expect(json_response['success']).to be(true)
@@ -359,7 +363,7 @@
 
       context 'when requesting metrics as JSON' do
         it 'returns a metrics JSON document' do
-          get :additional_metrics, environment_params(format: :json)
+          get :additional_metrics, params: environment_params(format: :json)
 
           expect(response).to have_gitlab_http_status(204)
           expect(json_response).to eq({})
@@ -379,7 +383,7 @@
       end
 
       it 'returns a metrics JSON document' do
-        get :additional_metrics, environment_params(format: :json)
+        get :additional_metrics, params: environment_params(format: :json)
 
         expect(response).to be_ok
         expect(json_response['success']).to be(true)
diff --git a/spec/controllers/projects/find_file_controller_spec.rb b/spec/controllers/projects/find_file_controller_spec.rb
index 66fe41108e2e59ace8a1edec04cd89d3bded5743..9072d67af07a5d47a0a7d425c95967de747b2292 100644
--- a/spec/controllers/projects/find_file_controller_spec.rb
+++ b/spec/controllers/projects/find_file_controller_spec.rb
@@ -17,9 +17,11 @@
 
     before do
       get(:show,
-          namespace_id: project.namespace,
-          project_id: project,
-          id: id)
+          params: {
+            namespace_id: project.namespace,
+            project_id: project,
+            id: id
+          })
     end
 
     context "valid branch" do
@@ -36,9 +38,11 @@
   describe "GET #list" do
     def go(format: 'json')
       get :list,
-          namespace_id: project.namespace,
-          project_id: project,
-          id: id,
+          params: {
+            namespace_id: project.namespace,
+            project_id: project,
+            id: id
+          },
           format: format
     end
 
diff --git a/spec/controllers/projects/forks_controller_spec.rb b/spec/controllers/projects/forks_controller_spec.rb
index 945b6142abf66118f9fc4006c41e1c534d8ae5d4..0e1663c8585aeae8ec535d3d5d9612bc2631429d 100644
--- a/spec/controllers/projects/forks_controller_spec.rb
+++ b/spec/controllers/projects/forks_controller_spec.rb
@@ -13,8 +13,10 @@
   describe 'GET index' do
     def get_forks
       get :index,
-        namespace_id: project.namespace,
-        project_id: project
+        params: {
+          namespace_id: project.namespace,
+          project_id: project
+        }
     end
 
     context 'when fork is public' do
@@ -83,8 +85,10 @@ def get_forks
   describe 'GET new' do
     def get_new
       get :new,
-        namespace_id: project.namespace,
-        project_id: project
+        params: {
+          namespace_id: project.namespace,
+          project_id: project
+        }
     end
 
     context 'when user is signed in' do
@@ -111,9 +115,11 @@ def get_new
   describe 'POST create' do
     def post_create
       post :create,
-        namespace_id: project.namespace,
-        project_id: project,
-        namespace_key: user.namespace.id
+        params: {
+          namespace_id: project.namespace,
+          project_id: project,
+          namespace_key: user.namespace.id
+        }
     end
 
     context 'when user is signed in' do
diff --git a/spec/controllers/projects/graphs_controller_spec.rb b/spec/controllers/projects/graphs_controller_spec.rb
index da78592a6f66765a893fc3092e4631b40936f404..73fb7307e11e495d254759bd9d7dbefd7d981470 100644
--- a/spec/controllers/projects/graphs_controller_spec.rb
+++ b/spec/controllers/projects/graphs_controller_spec.rb
@@ -11,7 +11,7 @@
 
   describe 'GET languages' do
     it "redirects_to action charts" do
-      get(:commits, namespace_id: project.namespace.path, project_id: project.path, id: 'master')
+      get(:commits, params: { namespace_id: project.namespace.path, project_id: project.path, id: 'master' })
 
       expect(response).to redirect_to action: :charts
     end
@@ -19,7 +19,7 @@
 
   describe 'GET commits' do
     it "redirects_to action charts" do
-      get(:commits, namespace_id: project.namespace.path, project_id: project.path, id: 'master')
+      get(:commits, params: { namespace_id: project.namespace.path, project_id: project.path, id: 'master' })
 
       expect(response).to redirect_to action: :charts
     end
diff --git a/spec/controllers/projects/group_links_controller_spec.rb b/spec/controllers/projects/group_links_controller_spec.rb
index 879aff26debc55c99eeb43a1087356a55ec8307b..675eeff8d12995d1f8c353cbdc5a4d1c2c9b00af 100644
--- a/spec/controllers/projects/group_links_controller_spec.rb
+++ b/spec/controllers/projects/group_links_controller_spec.rb
@@ -14,10 +14,12 @@
   describe '#create' do
     shared_context 'link project to group' do
       before do
-        post(:create, namespace_id: project.namespace,
-                      project_id: project,
-                      link_group_id: group.id,
-                      link_group_access: ProjectGroupLink.default_access)
+        post(:create, params: {
+                        namespace_id: project.namespace,
+                        project_id: project,
+                        link_group_id: group.id,
+                        link_group_access: ProjectGroupLink.default_access
+                      })
       end
     end
 
@@ -65,10 +67,12 @@
 
     context 'when project group id equal link group id' do
       before do
-        post(:create, namespace_id: project.namespace,
-                      project_id: project,
-                      link_group_id: group2.id,
-                      link_group_access: ProjectGroupLink.default_access)
+        post(:create, params: {
+                        namespace_id: project.namespace,
+                        project_id: project,
+                        link_group_id: group2.id,
+                        link_group_access: ProjectGroupLink.default_access
+                      })
       end
 
       it 'does not share project with selected group' do
@@ -84,9 +88,11 @@
 
     context 'when link group id is not present' do
       before do
-        post(:create, namespace_id: project.namespace,
-                      project_id: project,
-                      link_group_access: ProjectGroupLink.default_access)
+        post(:create, params: {
+                        namespace_id: project.namespace,
+                        project_id: project,
+                        link_group_access: ProjectGroupLink.default_access
+                      })
       end
 
       it 'redirects to project group links page' do
diff --git a/spec/controllers/projects/hooks_controller_spec.rb b/spec/controllers/projects/hooks_controller_spec.rb
index 7d3a8c3d0d32d599b8f6d1f5b088950d4b6e2c51..3037c922b68133b1fc345fb3549eb39d2e96fd1f 100644
--- a/spec/controllers/projects/hooks_controller_spec.rb
+++ b/spec/controllers/projects/hooks_controller_spec.rb
@@ -11,7 +11,7 @@
 
   describe '#index' do
     it 'redirects to settings/integrations page' do
-      get(:index, namespace_id: project.namespace, project_id: project)
+      get(:index, params: { namespace_id: project.namespace, project_id: project })
 
       expect(response).to redirect_to(
         project_settings_integrations_path(project)
@@ -38,7 +38,7 @@
         wiki_page_events: true
       }
 
-      post :create, namespace_id: project.namespace, project_id: project, hook: hook_params
+      post :create, params: { namespace_id: project.namespace, project_id: project, hook: hook_params }
 
       expect(response).to have_http_status(302)
       expect(ProjectHook.all.size).to eq(1)
diff --git a/spec/controllers/projects/imports_controller_spec.rb b/spec/controllers/projects/imports_controller_spec.rb
index cdc63f5aab3077e9fd9ecfe380e4276e55743758..3ebfe4b0918eaa3b458c3b506b68799f009381df 100644
--- a/spec/controllers/projects/imports_controller_spec.rb
+++ b/spec/controllers/projects/imports_controller_spec.rb
@@ -12,13 +12,13 @@
   describe 'GET #show' do
     context 'when repository does not exists' do
       it 'renders template' do
-        get :show, namespace_id: project.namespace.to_param, project_id: project
+        get :show, params: { namespace_id: project.namespace.to_param, project_id: project }
 
         expect(response).to render_template :show
       end
 
       it 'sets flash.now if params is present' do
-        get :show, namespace_id: project.namespace.to_param, project_id: project, continue: { to: '/', notice_now: 'Started' }
+        get :show, params: { namespace_id: project.namespace.to_param, project_id: project, continue: { to: '/', notice_now: 'Started' } }
 
         expect(flash.now[:notice]).to eq 'Started'
       end
@@ -34,13 +34,13 @@
         end
 
         it 'renders template' do
-          get :show, namespace_id: project.namespace.to_param, project_id: project
+          get :show, params: { namespace_id: project.namespace.to_param, project_id: project }
 
           expect(response).to render_template :show
         end
 
         it 'sets flash.now if params is present' do
-          get :show, namespace_id: project.namespace.to_param, project_id: project, continue: { to: '/', notice_now: 'In progress' }
+          get :show, params: { namespace_id: project.namespace.to_param, project_id: project, continue: { to: '/', notice_now: 'In progress' } }
 
           expect(flash.now[:notice]).to eq 'In progress'
         end
@@ -52,7 +52,7 @@
         end
 
         it 'redirects to new_namespace_project_import_path' do
-          get :show, namespace_id: project.namespace.to_param, project_id: project
+          get :show, params: { namespace_id: project.namespace.to_param, project_id: project }
 
           expect(response).to redirect_to new_project_import_path(project)
         end
@@ -67,7 +67,7 @@
           it 'redirects to namespace_project_path' do
             allow_any_instance_of(Project).to receive(:forked?).and_return(true)
 
-            get :show, namespace_id: project.namespace.to_param, project_id: project
+            get :show, params: { namespace_id: project.namespace.to_param, project_id: project }
 
             expect(flash[:notice]).to eq 'The project was successfully forked.'
             expect(response).to redirect_to project_path(project)
@@ -76,7 +76,7 @@
 
         context 'when project is external' do
           it 'redirects to namespace_project_path' do
-            get :show, namespace_id: project.namespace.to_param, project_id: project
+            get :show, params: { namespace_id: project.namespace.to_param, project_id: project }
 
             expect(flash[:notice]).to eq 'The project was successfully imported.'
             expect(response).to redirect_to project_path(project)
@@ -92,7 +92,7 @@
           end
 
           it 'redirects to internal params[:to]' do
-            get :show, namespace_id: project.namespace.to_param, project_id: project, continue: params
+            get :show, params: { namespace_id: project.namespace.to_param, project_id: project, continue: params }
 
             expect(flash[:notice]).to eq params[:notice]
             expect(response).to redirect_to params[:to]
@@ -101,7 +101,7 @@
           it 'does not redirect to external params[:to]' do
             params[:to] = "//google.com"
 
-            get :show, namespace_id: project.namespace.to_param, project_id: project, continue: params
+            get :show, params: { namespace_id: project.namespace.to_param, project_id: project, continue: params }
             expect(response).not_to redirect_to params[:to]
           end
         end
@@ -113,7 +113,7 @@
         end
 
         it 'redirects to namespace_project_path' do
-          get :show, namespace_id: project.namespace.to_param, project_id: project
+          get :show, params: { namespace_id: project.namespace.to_param, project_id: project }
 
           expect(response).to redirect_to project_path(project)
         end
diff --git a/spec/controllers/projects/issues_controller_spec.rb b/spec/controllers/projects/issues_controller_spec.rb
index 6240ab6d8671da72ef8ae8b6788a7124fe7df2b1..f9193513a6ad05b0d033bcd7815a716243c366ed 100644
--- a/spec/controllers/projects/issues_controller_spec.rb
+++ b/spec/controllers/projects/issues_controller_spec.rb
@@ -18,7 +18,7 @@
           project.issues_enabled = false
           project.save!
 
-          get :index, namespace_id: project.namespace, project_id: project
+          get :index, params: { namespace_id: project.namespace, project_id: project }
 
           expect(response).to have_gitlab_http_status(404)
         end
@@ -26,7 +26,7 @@
 
       context 'when GitLab issues enabled' do
         it 'renders the "index" template' do
-          get :index, namespace_id: project.namespace, project_id: project
+          get :index, params: { namespace_id: project.namespace, project_id: project }
 
           expect(response).to have_gitlab_http_status(200)
           expect(response).to render_template(:index)
@@ -45,13 +45,13 @@
       it_behaves_like 'set sort order from user preference'
 
       it "returns index" do
-        get :index, namespace_id: project.namespace, project_id: project
+        get :index, params: { namespace_id: project.namespace, project_id: project }
 
         expect(response).to have_gitlab_http_status(200)
       end
 
       it "returns 301 if request path doesn't match project path" do
-        get :index, namespace_id: project.namespace, project_id: project.path.upcase
+        get :index, params: { namespace_id: project.namespace, project_id: project.path.upcase }
 
         expect(response).to redirect_to(project_issues_path(project))
       end
@@ -60,7 +60,7 @@
         project.issues_enabled = false
         project.save!
 
-        get :index, namespace_id: project.namespace, project_id: project
+        get :index, params: { namespace_id: project.namespace, project_id: project }
         expect(response).to have_gitlab_http_status(404)
       end
     end
@@ -77,18 +77,22 @@
 
       it 'redirects to last_page if page number is larger than number of pages' do
         get :index,
-          namespace_id: project.namespace.to_param,
-          project_id: project,
-          page: (last_page + 1).to_param
+          params: {
+            namespace_id: project.namespace.to_param,
+            project_id: project,
+            page: (last_page + 1).to_param
+          }
 
         expect(response).to redirect_to(namespace_project_issues_path(page: last_page, state: controller.params[:state], scope: controller.params[:scope]))
       end
 
       it 'redirects to specified page' do
         get :index,
-          namespace_id: project.namespace.to_param,
-          project_id: project,
-          page: last_page.to_param
+          params: {
+            namespace_id: project.namespace.to_param,
+            project_id: project,
+            page: last_page.to_param
+          }
 
         expect(assigns(:issues).current_page).to eq(last_page)
         expect(response).to have_gitlab_http_status(200)
@@ -97,10 +101,12 @@
       it 'does not redirect to external sites when provided a host field' do
         external_host = "www.example.com"
         get :index,
-          namespace_id: project.namespace.to_param,
-          project_id: project,
-          page: (last_page + 1).to_param,
-          host: external_host
+          params: {
+            namespace_id: project.namespace.to_param,
+            project_id: project,
+            page: (last_page + 1).to_param,
+            host: external_host
+          }
 
         expect(response).to redirect_to(namespace_project_issues_path(page: last_page, state: controller.params[:state], scope: controller.params[:scope]))
       end
@@ -109,9 +115,11 @@
         allow(controller).to receive(:pagination_disabled?).and_return(true)
 
         get :index,
-          namespace_id: project.namespace.to_param,
-          project_id: project,
-          page: (last_page + 1).to_param
+          params: {
+            namespace_id: project.namespace.to_param,
+            project_id: project,
+            page: (last_page + 1).to_param
+          }
 
         expect(response).to have_gitlab_http_status(200)
         expect(assigns(:issues).size).to eq(2)
@@ -121,7 +129,7 @@
 
   describe 'GET #new' do
     it 'redirects to signin if not logged in' do
-      get :new, namespace_id: project.namespace, project_id: project
+      get :new, params: { namespace_id: project.namespace, project_id: project }
 
       expect(flash[:notice]).to eq 'Please sign in to create the new issue.'
       expect(response).to redirect_to(new_user_session_path)
@@ -134,7 +142,7 @@
       end
 
       it 'builds a new issue' do
-        get :new, namespace_id: project.namespace, project_id: project
+        get :new, params: { namespace_id: project.namespace, project_id: project }
 
         expect(assigns(:issue)).to be_a_new(Issue)
       end
@@ -144,7 +152,7 @@
         project_with_repository.add_developer(user)
         mr = create(:merge_request_with_diff_notes, source_project: project_with_repository)
 
-        get :new, namespace_id: project_with_repository.namespace, project_id: project_with_repository, merge_request_to_resolve_discussions_of: mr.iid
+        get :new, params: { namespace_id: project_with_repository.namespace, project_id: project_with_repository, merge_request_to_resolve_discussions_of: mr.iid }
 
         expect(assigns(:issue).title).not_to be_empty
         expect(assigns(:issue).description).not_to be_empty
@@ -153,7 +161,7 @@
       it 'fills in an issue for a discussion' do
         note = create(:note_on_merge_request, project: project)
 
-        get :new, namespace_id: project.namespace.path, project_id: project, merge_request_to_resolve_discussions_of: note.noteable.iid, discussion_to_resolve: note.discussion_id
+        get :new, params: { namespace_id: project.namespace.path, project_id: project, merge_request_to_resolve_discussions_of: note.noteable.iid, discussion_to_resolve: note.discussion_id }
 
         expect(assigns(:issue).title).not_to be_empty
         expect(assigns(:issue).description).not_to be_empty
@@ -178,7 +186,7 @@
           project.issues_enabled = false
           project.save!
 
-          get :new, namespace_id: project.namespace, project_id: project
+          get :new, params: { namespace_id: project.namespace, project_id: project }
 
           expect(response).to have_gitlab_http_status(404)
         end
@@ -186,7 +194,7 @@
 
       context 'when GitLab issues enabled' do
         it 'renders the "new" template' do
-          get :new, namespace_id: project.namespace, project_id: project
+          get :new, params: { namespace_id: project.namespace, project_id: project }
 
           expect(response).to have_gitlab_http_status(200)
           expect(response).to render_template(:new)
@@ -212,9 +220,11 @@
     context 'without an AJAX request' do
       it 'stores the visited URL' do
         get :show,
-          namespace_id: project.namespace.to_param,
-          project_id: project,
-          id: issue.iid
+          params: {
+            namespace_id: project.namespace.to_param,
+            project_id: project,
+            id: issue.iid
+          }
 
         expect(session['user_return_to']).to eq("/#{project.namespace.to_param}/#{project.to_param}/issues/#{issue.iid}")
       end
@@ -253,11 +263,13 @@
 
       def move_issue
         post :move,
-          format: :json,
-          namespace_id: project.namespace.to_param,
-          project_id: project,
-          id: issue.iid,
-          move_to_project_id: another_project.id
+          params: {
+            namespace_id: project.namespace.to_param,
+            project_id: project,
+            id: issue.iid,
+            move_to_project_id: another_project.id
+          },
+          format: :json
       end
     end
   end
@@ -265,10 +277,13 @@ def move_issue
   describe 'PUT #update' do
     subject do
       put :update,
-        namespace_id: project.namespace,
-        project_id: project,
-        id: issue.to_param,
-        issue: { title: 'New title' }, format: :json
+        params: {
+          namespace_id: project.namespace,
+          project_id: project,
+          id: issue.to_param,
+          issue: { title: 'New title' }
+        },
+        format: :json
     end
 
     before do
@@ -318,9 +333,11 @@ def move_issue
   describe 'GET #realtime_changes' do
     def go(id:)
       get :realtime_changes,
-        namespace_id: project.namespace.to_param,
-        project_id: project,
-        id: id
+        params: {
+          namespace_id: project.namespace.to_param,
+          project_id: project,
+          id: id
+        }
     end
 
     context 'when an issue was edited' do
@@ -433,8 +450,10 @@ def go(id:)
 
       def get_issues
         get :index,
-          namespace_id: project.namespace.to_param,
-          project_id: project
+          params: {
+            namespace_id: project.namespace.to_param,
+            project_id: project
+          }
       end
     end
 
@@ -502,7 +521,7 @@ def update_issue(issue_params: {}, additional_params: {}, id: nil)
           format: :json
         }.merge(additional_params)
 
-        put :update, params
+        put :update, params: params
       end
 
       def go(id:)
@@ -635,9 +654,11 @@ def update_verified_issue
 
       def go(id:)
         get :show,
-          namespace_id: project.namespace.to_param,
-          project_id: project,
-          id: id
+          params: {
+            namespace_id: project.namespace.to_param,
+            project_id: project,
+            id: id
+          }
       end
 
       it 'avoids (most) N+1s loading labels', :request_store do
@@ -658,9 +679,11 @@ def go(id:)
 
       def go(id:)
         get :realtime_changes,
-          namespace_id: project.namespace.to_param,
-          project_id: project,
-          id: id
+          params: {
+            namespace_id: project.namespace.to_param,
+            project_id: project,
+            id: id
+          }
       end
     end
 
@@ -669,9 +692,11 @@ def go(id:)
 
       def go(id:)
         get :edit,
-          namespace_id: project.namespace.to_param,
-          project_id: project,
-          id: id
+          params: {
+            namespace_id: project.namespace.to_param,
+            project_id: project,
+            id: id
+          }
       end
     end
 
@@ -680,10 +705,12 @@ def go(id:)
 
       def go(id:)
         put :update,
-          namespace_id: project.namespace.to_param,
-          project_id: project,
-          id: id,
-          issue: { title: 'New title' }
+          params: {
+            namespace_id: project.namespace.to_param,
+            project_id: project,
+            id: id,
+            issue: { title: 'New title' }
+          }
       end
     end
   end
@@ -694,7 +721,7 @@ def post_new_issue(issue_attrs = {}, additional_params = {})
       project = create(:project, :public)
       project.add_developer(user)
 
-      post :create, {
+      post :create, params: {
         namespace_id: project.namespace.to_param,
         project_id: project,
         issue: { title: 'Title', description: 'Description' }.merge(issue_attrs)
@@ -718,7 +745,7 @@ def post_new_issue(issue_attrs = {}, additional_params = {})
       end
 
       def post_issue(issue_params, other_params: {})
-        post :create, { namespace_id: project.namespace.to_param, project_id: project, issue: issue_params, merge_request_to_resolve_discussions_of: merge_request.iid }.merge(other_params)
+        post :create, params: { namespace_id: project.namespace.to_param, project_id: project, issue: issue_params, merge_request_to_resolve_discussions_of: merge_request.iid }.merge(other_params)
       end
 
       it 'creates an issue for the project' do
@@ -885,7 +912,7 @@ def post_spam
         create(:user_agent_detail, subject: issue)
         project.add_maintainer(admin)
         sign_in(admin)
-        post :mark_as_spam, {
+        post :mark_as_spam, params: {
           namespace_id: project.namespace,
           project_id: project,
           id: issue.iid
@@ -906,7 +933,7 @@ def post_spam
       end
 
       it "rejects a developer to destroy an issue" do
-        delete :destroy, namespace_id: project.namespace, project_id: project, id: issue.iid
+        delete :destroy, params: { namespace_id: project.namespace, project_id: project, id: issue.iid }
         expect(response).to have_gitlab_http_status(404)
       end
     end
@@ -921,7 +948,7 @@ def post_spam
       end
 
       it "deletes the issue" do
-        delete :destroy, namespace_id: project.namespace, project_id: project, id: issue.iid
+        delete :destroy, params: { namespace_id: project.namespace, project_id: project, id: issue.iid }
 
         expect(response).to have_gitlab_http_status(302)
         expect(controller).to set_flash[:notice].to(/The issue was successfully deleted\./)
@@ -930,7 +957,7 @@ def post_spam
       it 'delegates the update of the todos count cache to TodoService' do
         expect_any_instance_of(TodoService).to receive(:destroy_target).with(issue).once
 
-        delete :destroy, namespace_id: project.namespace, project_id: project, id: issue.iid
+        delete :destroy, params: { namespace_id: project.namespace, project_id: project, id: issue.iid }
       end
     end
   end
@@ -943,8 +970,12 @@ def post_spam
 
     it "toggles the award emoji" do
       expect do
-        post(:toggle_award_emoji, namespace_id: project.namespace,
-                                  project_id: project, id: issue.iid, name: "thumbsup")
+        post(:toggle_award_emoji, params: {
+                                    namespace_id: project.namespace,
+                                    project_id: project,
+                                    id: issue.iid,
+                                    name: "thumbsup"
+                                  })
       end.to change { issue.award_emoji.count }.by(1)
 
       expect(response).to have_gitlab_http_status(200)
@@ -986,9 +1017,11 @@ def post_spam
     end
 
     def create_merge_request
-      post :create_merge_request, namespace_id: project.namespace.to_param,
-                                  project_id: project.to_param,
-                                  id: issue.to_param,
+      post :create_merge_request, params: {
+                                    namespace_id: project.namespace.to_param,
+                                    project_id: project.to_param,
+                                    id: issue.to_param
+                                  },
                                   format: :json
     end
   end
@@ -1002,7 +1035,7 @@ def create_merge_request
       end
 
       it 'returns discussion json' do
-        get :discussions, namespace_id: project.namespace, project_id: project, id: issue.iid
+        get :discussions, params: { namespace_id: project.namespace, project_id: project, id: issue.iid }
 
         expect(json_response.first.keys).to match_array(%w[id reply_id expanded notes diff_discussion discussion_path individual_note resolvable resolved resolved_at resolved_by resolved_by_push commit_id for_commit project_id])
       end
@@ -1010,7 +1043,7 @@ def create_merge_request
       it 'renders the author status html if there is a status' do
         create(:user_status, user: discussion.author)
 
-        get :discussions, namespace_id: project.namespace, project_id: project, id: issue.iid
+        get :discussions, params: { namespace_id: project.namespace, project_id: project, id: issue.iid }
 
         note_json = json_response.first['notes'].first
 
@@ -1019,14 +1052,14 @@ def create_merge_request
 
       it 'does not cause an extra query for the status' do
         control = ActiveRecord::QueryRecorder.new do
-          get :discussions, namespace_id: project.namespace, project_id: project, id: issue.iid
+          get :discussions, params: { namespace_id: project.namespace, project_id: project, id: issue.iid }
         end
 
         create(:user_status, user: discussion.author)
         second_discussion = create(:discussion_note_on_issue, noteable: issue, project: issue.project, author: create(:user))
         create(:user_status, user: second_discussion.author)
 
-        expect { get :discussions, namespace_id: project.namespace, project_id: project, id: issue.iid }
+        expect { get :discussions, params: { namespace_id: project.namespace, project_id: project, id: issue.iid } }
           .not_to exceed_query_limit(control)
       end
 
@@ -1046,26 +1079,26 @@ def create_merge_request
         end
 
         it 'filters notes that the user should not see' do
-          get :discussions, namespace_id: project.namespace, project_id: project, id: issue.iid
+          get :discussions, params: { namespace_id: project.namespace, project_id: project, id: issue.iid }
 
           expect(JSON.parse(response.body).count).to eq(1)
         end
 
         it 'does not result in N+1 queries' do
           # Instantiate the controller variables to ensure QueryRecorder has an accurate base count
-          get :discussions, namespace_id: project.namespace, project_id: project, id: issue.iid
+          get :discussions, params: { namespace_id: project.namespace, project_id: project, id: issue.iid }
 
           RequestStore.clear!
 
           control_count = ActiveRecord::QueryRecorder.new do
-            get :discussions, namespace_id: project.namespace, project_id: project, id: issue.iid
+            get :discussions, params: { namespace_id: project.namespace, project_id: project, id: issue.iid }
           end.count
 
           RequestStore.clear!
 
           create_list(:discussion_note_on_issue, 2, :system, noteable: issue, project: issue.project, note: cross_reference)
 
-          expect { get :discussions, namespace_id: project.namespace, project_id: project, id: issue.iid }.not_to exceed_query_limit(control_count)
+          expect { get :discussions, params: { namespace_id: project.namespace, project_id: project, id: issue.iid } }.not_to exceed_query_limit(control_count)
         end
       end
     end
diff --git a/spec/controllers/projects/jobs_controller_spec.rb b/spec/controllers/projects/jobs_controller_spec.rb
index fca313dafb12acd811027a28e57c6c4164abde25..e1133fdd5626409915233a11749c9983e7708344 100644
--- a/spec/controllers/projects/jobs_controller_spec.rb
+++ b/spec/controllers/projects/jobs_controller_spec.rb
@@ -96,7 +96,7 @@ def get_index(**extra_params)
         project_id: project
       }
 
-      get :index, params.merge(extra_params)
+      get :index, params: params.merge(extra_params)
     end
   end
 
@@ -461,7 +461,7 @@ def get_show(**extra_params)
         project_id: project
       }
 
-      get :show, params.merge(extra_params)
+      get :show, params: params.merge(extra_params)
     end
   end
 
@@ -552,9 +552,11 @@ def get_show(**extra_params)
     end
 
     def get_trace
-      get :trace, namespace_id: project.namespace,
-                  project_id: project,
-                  id: job.id,
+      get :trace, params: {
+                    namespace_id: project.namespace,
+                    project_id: project,
+                    id: job.id
+                  },
                   format: :json
     end
   end
@@ -564,9 +566,11 @@ def get_trace
     let(:status) { job.detailed_status(double('user')) }
 
     before do
-      get :status, namespace_id: project.namespace,
-                   project_id: project,
-                   id: job.id,
+      get :status, params: {
+                     namespace_id: project.namespace,
+                     project_id: project,
+                     id: job.id
+                   },
                    format: :json
     end
 
@@ -605,9 +609,11 @@ def get_trace
     end
 
     def post_retry
-      post :retry, namespace_id: project.namespace,
-                   project_id: project,
-                   id: job.id
+      post :retry, params: {
+                     namespace_id: project.namespace,
+                     project_id: project,
+                     id: job.id
+                   }
     end
   end
 
@@ -645,9 +651,11 @@ def post_retry
     end
 
     def post_play
-      post :play, namespace_id: project.namespace,
-                  project_id: project,
-                  id: job.id
+      post :play, params: {
+                    namespace_id: project.namespace,
+                    project_id: project,
+                    id: job.id
+                  }
     end
   end
 
@@ -714,9 +722,9 @@ def post_play
     end
 
     def post_cancel(additional_params = {})
-      post :cancel, { namespace_id: project.namespace,
-                      project_id: project,
-                      id: job.id }.merge(additional_params)
+      post :cancel, params: { namespace_id: project.namespace,
+                              project_id: project,
+                              id: job.id }.merge(additional_params)
     end
   end
 
@@ -754,9 +762,11 @@ def post_cancel(additional_params = {})
     end
 
     def post_unschedule
-      post :unschedule, namespace_id: project.namespace,
-                        project_id: project,
-                        id: job.id
+      post :unschedule, params: {
+                          namespace_id: project.namespace,
+                          project_id: project,
+                          id: job.id
+                        }
     end
   end
 
@@ -797,8 +807,10 @@ def post_unschedule
     end
 
     def post_cancel_all
-      post :cancel_all, namespace_id: project.namespace,
-                        project_id: project
+      post :cancel_all, params: {
+                          namespace_id: project.namespace,
+                          project_id: project
+                        }
     end
   end
 
@@ -860,17 +872,21 @@ def post_cancel_all
     end
 
     def post_erase
-      post :erase, namespace_id: project.namespace,
-                   project_id: project,
-                   id: job.id
+      post :erase, params: {
+                     namespace_id: project.namespace,
+                     project_id: project,
+                     id: job.id
+                   }
     end
   end
 
   describe 'GET raw' do
     subject do
-      post :raw, namespace_id: project.namespace,
-                 project_id: project,
-                 id: job.id
+      post :raw, params: {
+                   namespace_id: project.namespace,
+                   project_id: project,
+                   id: job.id
+                 }
     end
 
     context "when job has a trace artifact" do
@@ -1020,7 +1036,7 @@ def get_terminal(**extra_params)
         project_id: project
       }
 
-      get :terminal, params.merge(extra_params)
+      get :terminal, params: params.merge(extra_params)
     end
   end
 
@@ -1074,7 +1090,7 @@ def get_terminal_websocket(**extra_params)
         project_id: project
       }
 
-      get :terminal_websocket_authorize, params.merge(extra_params)
+      get :terminal_websocket_authorize, params: params.merge(extra_params)
     end
   end
 end
diff --git a/spec/controllers/projects/labels_controller_spec.rb b/spec/controllers/projects/labels_controller_spec.rb
index e03d23bcdf6b28adb24c415b40097f43922e920a..32897a0f1b463af7112c64c9d96ffc45f00df1c5 100644
--- a/spec/controllers/projects/labels_controller_spec.rb
+++ b/spec/controllers/projects/labels_controller_spec.rb
@@ -67,7 +67,7 @@
     end
 
     def list_labels
-      get :index, namespace_id: project.namespace.to_param, project_id: project
+      get :index, params: { namespace_id: project.namespace.to_param, project_id: project }
     end
   end
 
@@ -76,7 +76,7 @@ def list_labels
       let(:personal_project) { create(:project, namespace: user.namespace) }
 
       it 'creates labels' do
-        post :generate, namespace_id: personal_project.namespace.to_param, project_id: personal_project
+        post :generate, params: { namespace_id: personal_project.namespace.to_param, project_id: personal_project }
 
         expect(response).to have_gitlab_http_status(302)
       end
@@ -84,7 +84,7 @@ def list_labels
 
     context 'project belonging to a group' do
       it 'creates labels' do
-        post :generate, namespace_id: project.namespace.to_param, project_id: project
+        post :generate, params: { namespace_id: project.namespace.to_param, project_id: project }
 
         expect(response).to have_gitlab_http_status(302)
       end
@@ -109,7 +109,7 @@ def list_labels
     end
 
     def toggle_subscription(label)
-      post :toggle_subscription, namespace_id: project.namespace.to_param, project_id: project, id: label.to_param
+      post :toggle_subscription, params: { namespace_id: project.namespace.to_param, project_id: project, id: label.to_param }
     end
   end
 
@@ -119,7 +119,7 @@ def toggle_subscription(label)
 
     context 'not group reporters' do
       it 'denies access' do
-        post :promote, namespace_id: project.namespace.to_param, project_id: project, id: label_1.to_param
+        post :promote, params: { namespace_id: project.namespace.to_param, project_id: project, id: label_1.to_param }
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -131,13 +131,13 @@ def toggle_subscription(label)
       end
 
       it 'gives access' do
-        post :promote, namespace_id: project.namespace.to_param, project_id: project, id: label_1.to_param
+        post :promote, params: { namespace_id: project.namespace.to_param, project_id: project, id: label_1.to_param }
 
         expect(response).to redirect_to(namespace_project_labels_path)
       end
 
       it 'promotes the label' do
-        post :promote, namespace_id: project.namespace.to_param, project_id: project, id: label_1.to_param
+        post :promote, params: { namespace_id: project.namespace.to_param, project_id: project, id: label_1.to_param }
 
         expect(Label.where(id: label_1.id)).to be_empty
         expect(GroupLabel.find_by(title: promoted_label_name)).not_to be_nil
@@ -146,7 +146,7 @@ def toggle_subscription(label)
       it 'renders label name without parsing it as HTML' do
         label_1.update!(name: 'CCC&lt;img src=x onerror=alert(document.domain)&gt;')
 
-        post :promote, namespace_id: project.namespace.to_param, project_id: project, id: label_1.to_param
+        post :promote, params: { namespace_id: project.namespace.to_param, project_id: project, id: label_1.to_param }
 
         expect(flash[:notice]).to eq("CCC&lt;img src=x onerror=alert(document.domain)&gt; promoted to <a href=\"#{group_labels_path(project.group)}\"><u>group label</u></a>.")
       end
@@ -159,7 +159,7 @@ def toggle_subscription(label)
         end
 
         it 'returns to label list' do
-          post :promote, namespace_id: project.namespace.to_param, project_id: project, id: label_1.to_param
+          post :promote, params: { namespace_id: project.namespace.to_param, project_id: project, id: label_1.to_param }
           expect(response).to redirect_to(namespace_project_labels_path)
         end
       end
@@ -176,7 +176,7 @@ def toggle_subscription(label)
         context 'non-show path' do
           context 'with exactly matching casing' do
             it 'does not redirect' do
-              get :index, namespace_id: project.namespace, project_id: project.to_param
+              get :index, params: { namespace_id: project.namespace, project_id: project.to_param }
 
               expect(response).not_to have_gitlab_http_status(301)
             end
@@ -184,7 +184,7 @@ def toggle_subscription(label)
 
           context 'with different casing' do
             it 'redirects to the correct casing' do
-              get :index, namespace_id: project.namespace, project_id: project.to_param.upcase
+              get :index, params: { namespace_id: project.namespace, project_id: project.to_param.upcase }
 
               expect(response).to redirect_to(project_labels_path(project))
               expect(controller).not_to set_flash[:notice]
@@ -197,7 +197,7 @@ def toggle_subscription(label)
         let!(:redirect_route) { project.redirect_routes.create(path: project.full_path + 'old') }
 
         it 'redirects to the canonical path' do
-          get :index, namespace_id: project.namespace, project_id: project.to_param + 'old'
+          get :index, params: { namespace_id: project.namespace, project_id: project.to_param + 'old' }
 
           expect(response).to redirect_to(project_labels_path(project))
           expect(controller).to set_flash[:notice].to(project_moved_message(redirect_route, project))
@@ -209,13 +209,13 @@ def toggle_subscription(label)
   context 'for a non-GET request' do
     context 'when requesting the canonical path with different casing' do
       it 'does not 404' do
-        post :generate, namespace_id: project.namespace, project_id: project
+        post :generate, params: { namespace_id: project.namespace, project_id: project }
 
         expect(response).not_to have_gitlab_http_status(404)
       end
 
       it 'does not redirect to the correct casing' do
-        post :generate, namespace_id: project.namespace, project_id: project
+        post :generate, params: { namespace_id: project.namespace, project_id: project }
 
         expect(response).not_to have_gitlab_http_status(301)
       end
@@ -225,7 +225,7 @@ def toggle_subscription(label)
       let!(:redirect_route) { project.redirect_routes.create(path: project.full_path + 'old') }
 
       it 'returns not found' do
-        post :generate, namespace_id: project.namespace, project_id: project.to_param + 'old'
+        post :generate, params: { namespace_id: project.namespace, project_id: project.to_param + 'old' }
 
         expect(response).to have_gitlab_http_status(404)
       end
diff --git a/spec/controllers/projects/mattermosts_controller_spec.rb b/spec/controllers/projects/mattermosts_controller_spec.rb
index c2a334a849c8acdeeaf0f8c5e2fc755c959cb512..6c8c7cd8f2bbd2cf2fbcf00e5a4f01afe4a489ac 100644
--- a/spec/controllers/projects/mattermosts_controller_spec.rb
+++ b/spec/controllers/projects/mattermosts_controller_spec.rb
@@ -17,8 +17,10 @@
 
     it 'accepts the request' do
       get(:new,
-          namespace_id: project.namespace.to_param,
-          project_id: project)
+          params: {
+            namespace_id: project.namespace.to_param,
+            project_id: project
+          })
 
       expect(response).to have_gitlab_http_status(200)
     end
@@ -29,9 +31,11 @@
 
     subject do
       post(:create,
-           namespace_id: project.namespace.to_param,
-           project_id: project,
-           mattermost: mattermost_params)
+           params: {
+             namespace_id: project.namespace.to_param,
+             project_id: project,
+             mattermost: mattermost_params
+           })
     end
 
     context 'no request can be made to mattermost' do
diff --git a/spec/controllers/projects/merge_requests/conflicts_controller_spec.rb b/spec/controllers/projects/merge_requests/conflicts_controller_spec.rb
index 1e1ea9a7144c0b1c62c9f1f66ca1f9374f6c8554..039f35875d2c2a53e654e3d74d91fc2238588edc 100644
--- a/spec/controllers/projects/merge_requests/conflicts_controller_spec.rb
+++ b/spec/controllers/projects/merge_requests/conflicts_controller_spec.rb
@@ -21,9 +21,11 @@
           .and_raise(Gitlab::Git::Conflict::Parser::UnmergeableFile)
 
         get :show,
-            namespace_id: merge_request_with_conflicts.project.namespace.to_param,
-            project_id: merge_request_with_conflicts.project,
-            id: merge_request_with_conflicts.iid,
+            params: {
+              namespace_id: merge_request_with_conflicts.project.namespace.to_param,
+              project_id: merge_request_with_conflicts.project,
+              id: merge_request_with_conflicts.iid
+            },
             format: 'json'
       end
 
@@ -39,9 +41,11 @@
     context 'with valid conflicts' do
       before do
         get :show,
-            namespace_id: merge_request_with_conflicts.project.namespace.to_param,
-            project_id: merge_request_with_conflicts.project,
-            id: merge_request_with_conflicts.iid,
+            params: {
+              namespace_id: merge_request_with_conflicts.project.namespace.to_param,
+              project_id: merge_request_with_conflicts.project,
+              id: merge_request_with_conflicts.iid
+            },
             format: 'json'
       end
 
@@ -99,11 +103,13 @@
   describe 'GET conflict_for_path' do
     def conflict_for_path(path)
       get :conflict_for_path,
-          namespace_id: merge_request_with_conflicts.project.namespace.to_param,
-          project_id: merge_request_with_conflicts.project,
-          id: merge_request_with_conflicts.iid,
-          old_path: path,
-          new_path: path,
+          params: {
+            namespace_id: merge_request_with_conflicts.project.namespace.to_param,
+            project_id: merge_request_with_conflicts.project,
+            id: merge_request_with_conflicts.iid,
+            old_path: path,
+            new_path: path
+          },
           format: 'json'
     end
 
@@ -160,12 +166,14 @@ def conflict_for_path(path)
 
     def resolve_conflicts(files)
       post :resolve_conflicts,
-           namespace_id: merge_request_with_conflicts.project.namespace.to_param,
-           project_id: merge_request_with_conflicts.project,
-           id: merge_request_with_conflicts.iid,
-           format: 'json',
-           files: files,
-           commit_message: 'Commit message'
+           params: {
+             namespace_id: merge_request_with_conflicts.project.namespace.to_param,
+             project_id: merge_request_with_conflicts.project,
+             id: merge_request_with_conflicts.iid,
+             files: files,
+             commit_message: 'Commit message'
+           },
+           format: 'json'
     end
 
     context 'with valid params' do
diff --git a/spec/controllers/projects/merge_requests/creations_controller_spec.rb b/spec/controllers/projects/merge_requests/creations_controller_spec.rb
index f8c37c0a676f817b5467371ae0f6f9f484cd3154..ac93393ac3af45bfc902e7a98d0359a577d74afb 100644
--- a/spec/controllers/projects/merge_requests/creations_controller_spec.rb
+++ b/spec/controllers/projects/merge_requests/creations_controller_spec.rb
@@ -24,7 +24,7 @@
   describe 'GET new' do
     context 'merge request that removes a submodule' do
       it 'renders new merge request widget template' do
-        get :new, get_diff_params
+        get :new, params: get_diff_params
 
         expect(response).to be_success
       end
@@ -52,7 +52,7 @@
         end
 
         it 'limits total commits' do
-          get :new, large_diff_params
+          get :new, params: large_diff_params
 
           expect(response).to be_success
 
@@ -66,7 +66,7 @@
       end
 
       it 'shows total commits' do
-        get :new, large_diff_params
+        get :new, params: large_diff_params
 
         expect(response).to be_success
 
@@ -85,7 +85,7 @@
       it 'does not assign diffs var' do
         allow_any_instance_of(MergeRequest).to receive(:can_be_created).and_return(false)
 
-        get :diffs, get_diff_params.merge(format: 'json')
+        get :diffs, params: get_diff_params.merge(format: 'json')
 
         expect(response).to be_success
         expect(assigns[:diffs]).to be_nil
@@ -101,7 +101,7 @@
     end
 
     it 'renders JSON including serialized pipelines' do
-      get :pipelines, get_diff_params.merge(format: 'json')
+      get :pipelines, params: get_diff_params.merge(format: 'json')
 
       expect(response).to be_ok
       expect(json_response).to have_key 'pipelines'
@@ -117,7 +117,7 @@ def diff_for_path(extra_params = {})
         format: 'json'
       }
 
-      get :diff_for_path, params.merge(extra_params)
+      get :diff_for_path, params: params.merge(extra_params)
     end
 
     let(:existing_path) { 'files/ruby/feature.rb' }
@@ -184,10 +184,12 @@ def diff_for_path(extra_params = {})
       expect(Ability).to receive(:allowed?).with(user, :read_project, project) { true }
 
       get :branch_to,
-          namespace_id: fork_project.namespace,
-          project_id: fork_project,
-          target_project_id: project.id,
-          ref: 'master'
+          params: {
+            namespace_id: fork_project.namespace,
+            project_id: fork_project,
+            target_project_id: project.id,
+            ref: 'master'
+          }
 
       expect(assigns(:commit)).not_to be_nil
       expect(response).to have_gitlab_http_status(200)
@@ -197,10 +199,12 @@ def diff_for_path(extra_params = {})
       expect(Ability).to receive(:allowed?).with(user, :read_project, project) { false }
 
       get :branch_to,
-          namespace_id: fork_project.namespace,
-          project_id: fork_project,
-          target_project_id: project.id,
-          ref: 'master'
+          params: {
+            namespace_id: fork_project.namespace,
+            project_id: fork_project,
+            target_project_id: project.id,
+            ref: 'master'
+          }
 
       expect(assigns(:commit)).to be_nil
       expect(response).to have_gitlab_http_status(200)
diff --git a/spec/controllers/projects/merge_requests/diffs_controller_spec.rb b/spec/controllers/projects/merge_requests/diffs_controller_spec.rb
index 8fc5d302af665d65bdf94c79b6d82997eaa8ba50..a6017d8e5e697ea96b11ace816f6d0e25e1fa59a 100644
--- a/spec/controllers/projects/merge_requests/diffs_controller_spec.rb
+++ b/spec/controllers/projects/merge_requests/diffs_controller_spec.rb
@@ -20,7 +20,7 @@ def go(extra_params = {})
         format: 'json'
       }
 
-      get :show, params.merge(extra_params)
+      get :show, params: params.merge(extra_params)
     end
 
     context 'with default params' do
@@ -89,7 +89,7 @@ def diff_for_path(extra_params = {})
         format: 'json'
       }
 
-      get :diff_for_path, params.merge(extra_params)
+      get :diff_for_path, params: params.merge(extra_params)
     end
 
     let(:existing_path) { 'files/ruby/popen.rb' }
diff --git a/spec/controllers/projects/merge_requests_controller_spec.rb b/spec/controllers/projects/merge_requests_controller_spec.rb
index e837c99d19c53e507d752700cfc7ff45f9d2262d..962dfb91c9fec58defddb74cdaa91e5302c6bd5c 100644
--- a/spec/controllers/projects/merge_requests_controller_spec.rb
+++ b/spec/controllers/projects/merge_requests_controller_spec.rb
@@ -19,9 +19,11 @@
   describe 'GET commit_change_content' do
     it 'renders commit_change_content template' do
       get :commit_change_content,
-        namespace_id: project.namespace.to_param,
-        project_id: project,
-        id: merge_request.iid,
+        params: {
+          namespace_id: project.namespace.to_param,
+          project_id: project,
+          id: merge_request.iid
+        },
         format: 'html'
 
       expect(response).to render_template('_commit_change_content')
@@ -31,9 +33,11 @@
   shared_examples "loads labels" do |action|
     it "loads labels into the @labels variable" do
       get action,
-          namespace_id: project.namespace.to_param,
-          project_id: project,
-          id: merge_request.iid,
+          params: {
+            namespace_id: project.namespace.to_param,
+            project_id: project,
+            id: merge_request.iid
+          },
           format: 'html'
       expect(assigns(:labels)).not_to be_nil
     end
@@ -47,7 +51,7 @@ def go(extra_params = {})
         id: merge_request.iid
       }
 
-      get :show, params.merge(extra_params)
+      get :show, params: params.merge(extra_params)
     end
 
     it_behaves_like "loads labels", :show
@@ -153,9 +157,12 @@ def go(extra_params = {})
 
     def get_merge_requests(page = nil)
       get :index,
-          namespace_id: project.namespace.to_param,
-          project_id: project,
-          state: 'opened', page: page.to_param
+          params: {
+            namespace_id: project.namespace.to_param,
+            project_id: project,
+            state: 'opened',
+            page: page.to_param
+          }
     end
 
     it_behaves_like "issuables list meta-data", :merge_request
@@ -182,11 +189,13 @@ def get_merge_requests(page = nil)
       it 'does not redirect to external sites when provided a host field' do
         external_host = "www.example.com"
         get :index,
-          namespace_id: project.namespace.to_param,
-          project_id: project,
-          state: 'opened',
-          page: (last_page + 1).to_param,
-          host: external_host
+          params: {
+            namespace_id: project.namespace.to_param,
+            project_id: project,
+            state: 'opened',
+            page: (last_page + 1).to_param,
+            host: external_host
+          }
 
         expect(response).to redirect_to(namespace_project_merge_requests_path(page: last_page, state: controller.params[:state], scope: controller.params[:scope]))
       end
@@ -227,7 +236,7 @@ def update_merge_request(mr_params, additional_params = {})
         merge_request: mr_params
       }.merge(additional_params)
 
-      put :update, params
+      put :update, params: params
     end
 
     context 'changing the assignee' do
@@ -324,7 +333,7 @@ def update_merge_request(mr_params, additional_params = {})
 
       before do
         project.add_reporter(user)
-        xhr :post, :merge, base_params
+        xhr :post, :merge, params: base_params
       end
 
       it 'returns 404' do
@@ -336,7 +345,7 @@ def update_merge_request(mr_params, additional_params = {})
       before do
         merge_request.update(title: "WIP: #{merge_request.title}")
 
-        post :merge, base_params
+        post :merge, params: base_params
       end
 
       it 'returns :failed' do
@@ -346,7 +355,7 @@ def update_merge_request(mr_params, additional_params = {})
 
     context 'when the sha parameter does not match the source SHA' do
       before do
-        post :merge, base_params.merge(sha: 'foo')
+        post :merge, params: base_params.merge(sha: 'foo')
       end
 
       it 'returns :sha_mismatch' do
@@ -396,7 +405,7 @@ def merge_with_sha(params = {})
         end
 
         def merge_when_pipeline_succeeds
-          post :merge, base_params.merge(sha: merge_request.diff_head_sha, merge_when_pipeline_succeeds: '1')
+          post :merge, params: base_params.merge(sha: merge_request.diff_head_sha, merge_when_pipeline_succeeds: '1')
         end
 
         it 'returns :merge_when_pipeline_succeeds' do
@@ -513,7 +522,7 @@ def merge_when_pipeline_succeeds
     let(:user) { create(:user) }
 
     it "denies access to users unless they're admin or project owner" do
-      delete :destroy, namespace_id: project.namespace, project_id: project, id: merge_request.iid
+      delete :destroy, params: { namespace_id: project.namespace, project_id: project, id: merge_request.iid }
 
       expect(response).to have_gitlab_http_status(404)
     end
@@ -528,7 +537,7 @@ def merge_when_pipeline_succeeds
       end
 
       it "deletes the merge request" do
-        delete :destroy, namespace_id: project.namespace, project_id: project, id: merge_request.iid
+        delete :destroy, params: { namespace_id: project.namespace, project_id: project, id: merge_request.iid }
 
         expect(response).to have_gitlab_http_status(302)
         expect(controller).to set_flash[:notice].to(/The merge request was successfully deleted\./)
@@ -537,7 +546,7 @@ def merge_when_pipeline_succeeds
       it 'delegates the update of the todos count cache to TodoService' do
         expect_any_instance_of(TodoService).to receive(:destroy_target).with(merge_request).once
 
-        delete :destroy, namespace_id: project.namespace, project_id: project, id: merge_request.iid
+        delete :destroy, params: { namespace_id: project.namespace, project_id: project, id: merge_request.iid }
       end
     end
   end
@@ -545,9 +554,11 @@ def merge_when_pipeline_succeeds
   describe 'GET commits' do
     def go(format: 'html')
       get :commits,
-          namespace_id: project.namespace.to_param,
-          project_id: project,
-          id: merge_request.iid,
+          params: {
+            namespace_id: project.namespace.to_param,
+            project_id: project,
+            id: merge_request.iid
+          },
           format: format
     end
 
@@ -566,9 +577,11 @@ def go(format: 'html')
                            sha: merge_request.diff_head_sha)
 
       get :pipelines,
-          namespace_id: project.namespace.to_param,
-          project_id: project,
-          id: merge_request.iid,
+          params: {
+            namespace_id: project.namespace.to_param,
+            project_id: project,
+            id: merge_request.iid
+          },
           format: :json
     end
 
@@ -582,9 +595,11 @@ def go(format: 'html')
   describe 'GET test_reports' do
     subject do
       get :test_reports,
-          namespace_id: project.namespace.to_param,
-          project_id: project,
-          id: merge_request.iid,
+          params: {
+            namespace_id: project.namespace.to_param,
+            project_id: project,
+            id: merge_request.iid
+          },
           format: :json
     end
 
@@ -667,10 +682,12 @@ def go(format: 'html')
       merge_request.save
 
       xhr :post, :remove_wip,
-        namespace_id: merge_request.project.namespace.to_param,
-        project_id: merge_request.project,
-        id: merge_request.iid,
-        format: :json
+        format: :json,
+        params: {
+          namespace_id: merge_request.project.namespace.to_param,
+          project_id: merge_request.project,
+          id: merge_request.iid
+        }
     end
 
     it 'removes the wip status' do
@@ -685,10 +702,12 @@ def go(format: 'html')
   describe 'POST cancel_merge_when_pipeline_succeeds' do
     subject do
       xhr :post, :cancel_merge_when_pipeline_succeeds,
-        namespace_id: merge_request.project.namespace.to_param,
-        project_id: merge_request.project,
-        id: merge_request.iid,
-        format: :json
+        format: :json,
+        params: {
+          namespace_id: merge_request.project.namespace.to_param,
+          project_id: merge_request.project,
+          id: merge_request.iid
+        }
     end
 
     it 'calls MergeRequests::MergeWhenPipelineSucceedsService' do
@@ -723,9 +742,11 @@ def post_assign_issues
                             target_branch: 'master')
 
       post :assign_related_issues,
-           namespace_id: project.namespace.to_param,
-           project_id: project,
-           id: merge_request.iid
+           params: {
+             namespace_id: project.namespace.to_param,
+             project_id: project,
+             id: merge_request.iid
+           }
     end
 
     it 'shows a flash message on success' do
@@ -824,7 +845,7 @@ def get_ci_environments_status(extra_params = {})
           format: 'json'
         }
 
-        get :ci_environments_status, params.merge(extra_params)
+        get :ci_environments_status, params: params.merge(extra_params)
       end
     end
   end
@@ -865,9 +886,11 @@ def get_ci_environments_status(extra_params = {})
     end
 
     def get_pipeline_status
-      get :pipeline_status, namespace_id: project.namespace,
-                            project_id: project,
-                            id: merge_request.iid,
+      get :pipeline_status, params: {
+                              namespace_id: project.namespace,
+                              project_id: project,
+                              id: merge_request.iid
+                            },
                             format: :json
     end
   end
@@ -876,7 +899,7 @@ def get_pipeline_status
     let(:viewer)        { user }
 
     def post_rebase
-      post :rebase, namespace_id: project.namespace, project_id: project, id: merge_request
+      post :rebase, params: { namespace_id: project.namespace, project_id: project, id: merge_request }
     end
 
     def expect_rebase_worker_for(user)
@@ -934,13 +957,13 @@ def expect_rebase_worker_for(user)
 
   describe 'GET edit' do
     it 'responds successfully' do
-      get :edit, namespace_id: project.namespace, project_id: project, id: merge_request
+      get :edit, params: { namespace_id: project.namespace, project_id: project, id: merge_request }
 
       expect(response).to have_gitlab_http_status(:success)
     end
 
     it 'assigns the noteable to make sure autocompletes work' do
-      get :edit, namespace_id: project.namespace, project_id: project, id: merge_request
+      get :edit, params: { namespace_id: project.namespace, project_id: project, id: merge_request }
 
       expect(assigns(:noteable)).not_to be_nil
     end
diff --git a/spec/controllers/projects/milestones_controller_spec.rb b/spec/controllers/projects/milestones_controller_spec.rb
index 658aa2a6738784de35b7d143cb66e977481cb675..5892024e756421c6b62be4504a08cbd893cf273d 100644
--- a/spec/controllers/projects/milestones_controller_spec.rb
+++ b/spec/controllers/projects/milestones_controller_spec.rb
@@ -22,7 +22,7 @@
 
     def view_milestone(options = {})
       params = { namespace_id: project.namespace.id, project_id: project.id, id: milestone.iid }
-      get :show, params.merge(options)
+      get :show, params: params.merge(options)
     end
 
     it 'shows milestone page' do
@@ -43,9 +43,11 @@ def view_milestone(options = {})
   describe "#index" do
     context "as html" do
       def render_index(project:, page:)
-        get :index, namespace_id: project.namespace.id,
-                    project_id: project.id,
-                    page: page
+        get :index, params: {
+                      namespace_id: project.namespace.id,
+                      project_id: project.id,
+                      page: page
+                    }
       end
 
       it "queries only projects milestones" do
@@ -90,7 +92,7 @@ def render_index(project:, page:)
       context 'with a single group ancestor' do
         before do
           project.update(namespace: group)
-          get :index, namespace_id: project.namespace.id, project_id: project.id, format: :json
+          get :index, params: { namespace_id: project.namespace.id, project_id: project.id }, format: :json
         end
 
         it "queries projects milestones and groups milestones" do
@@ -107,7 +109,7 @@ def render_index(project:, page:)
 
         before do
           project.update(namespace: subgroup)
-          get :index, namespace_id: project.namespace.id, project_id: project.id, format: :json
+          get :index, params: { namespace_id: project.namespace.id, project_id: project.id }, format: :json
         end
 
         it "queries projects milestones and all ancestors milestones" do
@@ -124,7 +126,7 @@ def render_index(project:, page:)
     it "removes milestone" do
       expect(issue.milestone_id).to eq(milestone.id)
 
-      delete :destroy, namespace_id: project.namespace.id, project_id: project.id, id: milestone.iid, format: :js
+      delete :destroy, params: { namespace_id: project.namespace.id, project_id: project.id, id: milestone.iid }, format: :js
       expect(response).to be_success
 
       expect(Event.recent.first.action).to eq(Event::DESTROYED)
@@ -155,7 +157,7 @@ def render_index(project:, page:)
       end
 
       it 'renders 404' do
-        post :promote, namespace_id: project.namespace.id, project_id: project.id, id: milestone.iid
+        post :promote, params: { namespace_id: project.namespace.id, project_id: project.id, id: milestone.iid }
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -167,7 +169,7 @@ def render_index(project:, page:)
       end
 
       it 'shows group milestone' do
-        post :promote, namespace_id: project.namespace.id, project_id: project.id, id: milestone.iid
+        post :promote, params: { namespace_id: project.namespace.id, project_id: project.id, id: milestone.iid }
 
         expect(flash[:notice]).to eq("#{milestone.title} promoted to <a href=\"#{group_milestone_path(project.group, milestone.iid)}\"><u>group milestone</u></a>.")
         expect(response).to redirect_to(project_milestones_path(project))
@@ -176,7 +178,7 @@ def render_index(project:, page:)
       it 'renders milestone name without parsing it as HTML' do
         milestone.update!(name: 'CCC&lt;img src=x onerror=alert(document.domain)&gt;')
 
-        post :promote, namespace_id: project.namespace.id, project_id: project.id, id: milestone.iid
+        post :promote, params: { namespace_id: project.namespace.id, project_id: project.id, id: milestone.iid }
 
         expect(flash[:notice]).to eq("CCC promoted to <a href=\"#{group_milestone_path(project.group, milestone.iid)}\"><u>group milestone</u></a>.")
       end
@@ -190,7 +192,7 @@ def render_index(project:, page:)
       it 'renders 404' do
         project.update(namespace: user.namespace)
 
-        post :promote, namespace_id: project.namespace.id, project_id: project.id, id: milestone.iid
+        post :promote, params: { namespace_id: project.namespace.id, project_id: project.id, id: milestone.iid }
 
         expect(response).to have_gitlab_http_status(404)
       end
diff --git a/spec/controllers/projects/mirrors_controller_spec.rb b/spec/controllers/projects/mirrors_controller_spec.rb
index 976f480930ce328ed9f94f261ca3b06d23246e0d..86a12a5e903fb35b1e266a810ac7424ac02b2b98 100644
--- a/spec/controllers/projects/mirrors_controller_spec.rb
+++ b/spec/controllers/projects/mirrors_controller_spec.rb
@@ -147,7 +147,7 @@
     end
 
     def do_get(project, url = 'ssh://example.com')
-      get :ssh_host_keys, namespace_id: project.namespace, project_id: project, ssh_url: url
+      get :ssh_host_keys, params: { namespace_id: project.namespace, project_id: project, ssh_url: url }
     end
   end
 
@@ -155,6 +155,6 @@ def do_put(project, options, extra_attrs = {})
     attrs = extra_attrs.merge(namespace_id: project.namespace.to_param, project_id: project.to_param)
     attrs[:project] = options
 
-    put :update, attrs
+    put :update, params: attrs
   end
 end
diff --git a/spec/controllers/projects/notes_controller_spec.rb b/spec/controllers/projects/notes_controller_spec.rb
index 9a5df2aded74687d28cbc4eaa0af7a5c07065ce4..818925758896b42e48e415ea250f667c26a3d593 100644
--- a/spec/controllers/projects/notes_controller_spec.rb
+++ b/spec/controllers/projects/notes_controller_spec.rb
@@ -44,7 +44,7 @@
         .with(anything, anything, hash_including(last_fetched_at: last_fetched_at))
         .and_call_original
 
-      get :index, request_params
+      get :index, params: request_params
     end
 
     context 'when user notes_filter is present' do
@@ -55,7 +55,7 @@
       it 'filters system notes by comments' do
         user.set_notes_filter(UserPreference::NOTES_FILTERS[:only_comments], issue)
 
-        get :index, request_params
+        get :index, params: request_params
 
         expect(notes_json.count).to eq(1)
         expect(notes_json.first[:id].to_i).to eq(comment.id)
@@ -64,7 +64,7 @@
       it 'returns all notes' do
         user.set_notes_filter(UserPreference::NOTES_FILTERS[:all_notes], issue)
 
-        get :index, request_params
+        get :index, params: request_params
 
         expect(notes_json.map { |note| note[:id].to_i }).to contain_exactly(comment.id, system_note.id)
       end
@@ -74,7 +74,7 @@
 
         expect(ResourceEvents::MergeIntoNotesService).not_to receive(:new)
 
-        get :index, request_params
+        get :index, params: request_params
       end
     end
 
@@ -85,7 +85,7 @@
       let(:params) { request_params.merge(target_type: 'merge_request', target_id: note.noteable_id, html: true) }
 
       it 'responds with the expected attributes' do
-        get :index, params
+        get :index, params: params
 
         expect(note_json[:id]).to eq(note.id)
         expect(note_json[:discussion_html]).not_to be_nil
@@ -101,7 +101,7 @@
       let(:params) { request_params.merge(target_type: 'merge_request', target_id: note.noteable_id, html: true) }
 
       it 'responds with the expected attributes' do
-        get :index, params
+        get :index, params: params
 
         expect(note_json[:id]).to eq(note.id)
         expect(note_json[:discussion_html]).not_to be_nil
@@ -120,7 +120,7 @@
         let(:params) { request_params.merge(target_type: 'merge_request', target_id: merge_request.id, html: true) }
 
         it 'responds with the expected attributes' do
-          get :index, params
+          get :index, params: params
 
           expect(note_json[:id]).to eq(note.id)
           expect(note_json[:discussion_html]).not_to be_nil
@@ -133,7 +133,7 @@
         let(:params) { request_params.merge(target_type: 'commit', target_id: note.commit_id, html: true) }
 
         it 'responds with the expected attributes' do
-          get :index, params
+          get :index, params: params
 
           expect(note_json[:id]).to eq(note.id)
           expect(note_json[:discussion_html]).to be_nil
@@ -148,7 +148,7 @@
           end
 
           it 'renders 404' do
-            get :index, params
+            get :index, params: params
 
             expect(response).to have_gitlab_http_status(404)
           end
@@ -162,7 +162,7 @@
       let(:params) { request_params.merge(target_type: 'merge_request', target_id: note.noteable_id, html: true) }
 
       it 'responds with the expected attributes' do
-        get :index, params
+        get :index, params: params
 
         expect(note_json[:id]).to eq(note.id)
         expect(note_json[:html]).not_to be_nil
@@ -182,7 +182,7 @@
       end
 
       it 'filters notes that the user should not see' do
-        get :index, request_params
+        get :index, params: request_params
 
         expect(parsed_response[:notes].count).to eq(1)
         expect(note_json[:id]).to eq(note.id.to_s)
@@ -190,19 +190,19 @@
 
       it 'does not result in N+1 queries' do
         # Instantiate the controller variables to ensure QueryRecorder has an accurate base count
-        get :index, request_params
+        get :index, params: request_params
 
         RequestStore.clear!
 
         control_count = ActiveRecord::QueryRecorder.new do
-          get :index, request_params
+          get :index, params: request_params
         end.count
 
         RequestStore.clear!
 
         create_list(:discussion_note_on_issue, 2, :system, noteable: issue, project: issue.project, note: cross_reference)
 
-        expect { get :index, request_params }.not_to exceed_query_limit(control_count)
+        expect { get :index, params: request_params }.not_to exceed_query_limit(control_count)
       end
     end
   end
@@ -227,19 +227,19 @@
     end
 
     it "returns status 302 for html" do
-      post :create, request_params
+      post :create, params: request_params
 
       expect(response).to have_gitlab_http_status(302)
     end
 
     it "returns status 200 for json" do
-      post :create, request_params.merge(format: :json)
+      post :create, params: request_params.merge(format: :json)
 
       expect(response).to have_gitlab_http_status(200)
     end
 
     it 'returns discussion JSON when the return_discussion param is set' do
-      post :create, request_params.merge(format: :json, return_discussion: 'true')
+      post :create, params: request_params.merge(format: :json, return_discussion: 'true')
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response).to have_key 'discussion'
@@ -260,7 +260,7 @@
       end
 
       it "returns status 302 for html" do
-        post :create, request_params
+        post :create, params: request_params
 
         expect(response).to have_gitlab_http_status(302)
       end
@@ -282,7 +282,7 @@
       end
 
       def post_create(extra_params = {})
-        post :create, {
+        post :create, params: {
           note: { note: 'some other note', noteable_id: merge_request.id },
           namespace_id: project.namespace,
           project_id: project,
@@ -342,7 +342,7 @@ def post_create(extra_params = {})
           namespace_id: project.namespace
         }
 
-        expect { post :create, request_params }.to change { issue.notes.count }.by(1)
+        expect { post :create, params: request_params }.to change { issue.notes.count }.by(1)
           .and change { locked_issue.notes.count }.by(0)
         expect(response).to have_gitlab_http_status(302)
       end
@@ -357,7 +357,7 @@ def post_create(extra_params = {})
       context 'when a noteable is not found' do
         it 'returns 404 status' do
           request_params[:target_id] = 9999
-          post :create, request_params.merge(format: :json)
+          post :create, params: request_params.merge(format: :json)
 
           expect(response).to have_gitlab_http_status(404)
         end
@@ -365,19 +365,19 @@ def post_create(extra_params = {})
 
       context 'when a user is a team member' do
         it 'returns 302 status for html' do
-          post :create, request_params
+          post :create, params: request_params
 
           expect(response).to have_gitlab_http_status(302)
         end
 
         it 'returns 200 status for json' do
-          post :create, request_params.merge(format: :json)
+          post :create, params: request_params.merge(format: :json)
 
           expect(response).to have_gitlab_http_status(200)
         end
 
         it 'creates a new note' do
-          expect { post :create, request_params }.to change { Note.count }.by(1)
+          expect { post :create, params: request_params }.to change { Note.count }.by(1)
         end
       end
 
@@ -387,13 +387,13 @@ def post_create(extra_params = {})
         end
 
         it 'returns 404 status' do
-          post :create, request_params
+          post :create, params: request_params
 
           expect(response).to have_gitlab_http_status(404)
         end
 
         it 'does not create a new note' do
-          expect { post :create, request_params }.not_to change { Note.count }
+          expect { post :create, params: request_params }.not_to change { Note.count }
         end
       end
     end
@@ -419,7 +419,7 @@ def post_create(extra_params = {})
       end
 
       it "updates the note" do
-        expect { put :update, request_params }.to change { note.reload.note }
+        expect { put :update, params: request_params }.to change { note.reload.note }
       end
     end
     context "doesnt update the note" do
@@ -441,7 +441,7 @@ def post_create(extra_params = {})
             note: "New comment"
           }
         }
-        expect { put :update, request_params }.not_to change { note.reload.note }
+        expect { put :update, params: request_params }.not_to change { note.reload.note }
         expect(response).to have_gitlab_http_status(404)
       end
     end
@@ -464,13 +464,13 @@ def post_create(extra_params = {})
       end
 
       it "returns status 200 for html" do
-        delete :destroy, request_params
+        delete :destroy, params: request_params
 
         expect(response).to have_gitlab_http_status(200)
       end
 
       it "deletes the note" do
-        expect { delete :destroy, request_params }.to change { Note.count }.from(1).to(0)
+        expect { delete :destroy, params: request_params }.to change { Note.count }.from(1).to(0)
       end
     end
 
@@ -481,7 +481,7 @@ def post_create(extra_params = {})
       end
 
       it "returns status 404" do
-        delete :destroy, request_params
+        delete :destroy, params: request_params
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -496,17 +496,17 @@ def post_create(extra_params = {})
 
     it "toggles the award emoji" do
       expect do
-        post(:toggle_award_emoji, request_params.merge(name: "thumbsup"))
+        post(:toggle_award_emoji, params: request_params.merge(name: "thumbsup"))
       end.to change { note.award_emoji.count }.by(1)
 
       expect(response).to have_gitlab_http_status(200)
     end
 
     it "removes the already awarded emoji" do
-      post(:toggle_award_emoji, request_params.merge(name: "thumbsup"))
+      post(:toggle_award_emoji, params: request_params.merge(name: "thumbsup"))
 
       expect do
-        post(:toggle_award_emoji, request_params.merge(name: "thumbsup"))
+        post(:toggle_award_emoji, params: request_params.merge(name: "thumbsup"))
       end.to change { AwardEmoji.count }.by(-1)
 
       expect(response).to have_gitlab_http_status(200)
@@ -525,7 +525,7 @@ def post_create(extra_params = {})
 
       context "when the user is not authorized to resolve the note" do
         it "returns status 404" do
-          post :resolve, request_params
+          post :resolve, params: request_params
 
           expect(response).to have_gitlab_http_status(404)
         end
@@ -542,7 +542,7 @@ def post_create(extra_params = {})
           end
 
           it "returns status 404" do
-            post :resolve, request_params
+            post :resolve, params: request_params
 
             expect(response).to have_gitlab_http_status(404)
           end
@@ -550,7 +550,7 @@ def post_create(extra_params = {})
 
         context "when the note is resolvable" do
           it "resolves the note" do
-            post :resolve, request_params
+            post :resolve, params: request_params
 
             expect(note.reload.resolved?).to be true
             expect(note.reload.resolved_by).to eq(user)
@@ -559,17 +559,17 @@ def post_create(extra_params = {})
           it "sends notifications if all discussions are resolved" do
             expect_any_instance_of(MergeRequests::ResolvedDiscussionNotificationService).to receive(:execute).with(merge_request)
 
-            post :resolve, request_params
+            post :resolve, params: request_params
           end
 
           it "returns the name of the resolving user" do
-            post :resolve, request_params.merge(html: true)
+            post :resolve, params: request_params.merge(html: true)
 
             expect(JSON.parse(response.body)["resolved_by"]).to eq(user.name)
           end
 
           it "returns status 200" do
-            post :resolve, request_params
+            post :resolve, params: request_params
 
             expect(response).to have_gitlab_http_status(200)
           end
@@ -586,7 +586,7 @@ def post_create(extra_params = {})
 
       context "when the user is not authorized to resolve the note" do
         it "returns status 404" do
-          delete :unresolve, request_params
+          delete :unresolve, params: request_params
 
           expect(response).to have_gitlab_http_status(404)
         end
@@ -603,7 +603,7 @@ def post_create(extra_params = {})
           end
 
           it "returns status 404" do
-            delete :unresolve, request_params
+            delete :unresolve, params: request_params
 
             expect(response).to have_gitlab_http_status(404)
           end
@@ -611,13 +611,13 @@ def post_create(extra_params = {})
 
         context "when the note is resolvable" do
           it "unresolves the note" do
-            delete :unresolve, request_params
+            delete :unresolve, params: request_params
 
             expect(note.reload.resolved?).to be false
           end
 
           it "returns status 200" do
-            delete :unresolve, request_params
+            delete :unresolve, params: request_params
 
             expect(response).to have_gitlab_http_status(200)
           end
diff --git a/spec/controllers/projects/pages_controller_spec.rb b/spec/controllers/projects/pages_controller_spec.rb
index 927b6e0c47336b70aab5d5c5ce6016671f1eb289..382c1b5d12460f0ab24ebbc7a46d380ebc06f389 100644
--- a/spec/controllers/projects/pages_controller_spec.rb
+++ b/spec/controllers/projects/pages_controller_spec.rb
@@ -19,7 +19,7 @@
 
   describe 'GET show' do
     it 'returns 200 status' do
-      get :show, request_params
+      get :show, params: request_params
 
       expect(response).to have_gitlab_http_status(200)
     end
@@ -29,7 +29,7 @@
       let(:project) { create(:project, namespace: group) }
 
       it 'returns a 404 status code' do
-        get :show, request_params
+        get :show, params: request_params
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -38,7 +38,7 @@
 
   describe 'DELETE destroy' do
     it 'returns 302 status' do
-      delete :destroy, request_params
+      delete :destroy, params: request_params
 
       expect(response).to have_gitlab_http_status(302)
     end
@@ -51,7 +51,7 @@
 
     describe 'GET show' do
       it 'returns 404 status' do
-        get :show, request_params
+        get :show, params: request_params
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -59,7 +59,7 @@
 
     describe 'DELETE destroy' do
       it 'returns 404 status' do
-        delete :destroy, request_params
+        delete :destroy, params: request_params
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -82,13 +82,13 @@
     end
 
     it 'returns 302 status' do
-      patch :update, request_params
+      patch :update, params: request_params
 
       expect(response).to have_gitlab_http_status(:found)
     end
 
     it 'redirects back to the pages settings' do
-      patch :update, request_params
+      patch :update, params: request_params
 
       expect(response).to redirect_to(project_pages_path(project))
     end
@@ -99,7 +99,7 @@
         .with(project, user, ActionController::Parameters.new(request_params[:project]).permit!)
         .and_return(update_service)
 
-      patch :update, request_params
+      patch :update, params: request_params
     end
   end
 end
diff --git a/spec/controllers/projects/pages_domains_controller_spec.rb b/spec/controllers/projects/pages_domains_controller_spec.rb
index b9cf3e9b0916ff23fe14dca9ec88bfb389005602..8b7f7587701357713bc59f4a5b22779763e71005 100644
--- a/spec/controllers/projects/pages_domains_controller_spec.rb
+++ b/spec/controllers/projects/pages_domains_controller_spec.rb
@@ -24,7 +24,7 @@
 
   describe 'GET show' do
     it "displays the 'show' page" do
-      get(:show, request_params.merge(id: pages_domain.domain))
+      get(:show, params: request_params.merge(id: pages_domain.domain))
 
       expect(response).to have_gitlab_http_status(200)
       expect(response).to render_template('show')
@@ -33,7 +33,7 @@
 
   describe 'GET new' do
     it "displays the 'new' page" do
-      get(:new, request_params)
+      get(:new, params: request_params)
 
       expect(response).to have_gitlab_http_status(200)
       expect(response).to render_template('new')
@@ -43,7 +43,7 @@
   describe 'POST create' do
     it "creates a new pages domain" do
       expect do
-        post(:create, request_params.merge(pages_domain: pages_domain_params))
+        post(:create, params: request_params.merge(pages_domain: pages_domain_params))
       end.to change { PagesDomain.count }.by(1)
 
       created_domain = PagesDomain.reorder(:id).last
@@ -55,7 +55,7 @@
 
   describe 'GET edit' do
     it "displays the 'edit' page" do
-      get(:edit, request_params.merge(id: pages_domain.domain))
+      get(:edit, params: request_params.merge(id: pages_domain.domain))
 
       expect(response).to have_gitlab_http_status(200)
       expect(response).to render_template('edit')
@@ -81,11 +81,11 @@
         .with(ActionController::Parameters.new(pages_domain_params).permit!)
         .and_return(true)
 
-      patch(:update, params)
+      patch(:update, params: params)
     end
 
     it 'redirects to the project page' do
-      patch(:update, params)
+      patch(:update, params: params)
 
       expect(flash[:notice]).to eq 'Domain was updated'
       expect(response).to redirect_to(project_pages_path(project))
@@ -95,7 +95,7 @@
       it 'renders the edit action' do
         allow(pages_domain).to receive(:update).and_return(false)
 
-        patch(:update, params)
+        patch(:update, params: params)
 
         expect(response).to render_template('edit')
       end
@@ -108,7 +108,7 @@
           .with(hash_not_including(:domain))
           .and_return(true)
 
-        patch(:update, params.deep_merge(pages_domain: { domain: 'abc' }))
+        patch(:update, params: params.deep_merge(pages_domain: { domain: 'abc' }))
       end
     end
   end
@@ -127,7 +127,7 @@ def stub_service
     it 'handles verification success' do
       expect(stub_service).to receive(:execute).and_return(status: :success)
 
-      post :verify, params
+      post :verify, params: params
 
       expect(response).to redirect_to project_pages_domain_path(project, pages_domain)
       expect(flash[:notice]).to eq('Successfully verified domain ownership')
@@ -136,14 +136,14 @@ def stub_service
     it 'handles verification failure' do
       expect(stub_service).to receive(:execute).and_return(status: :failed)
 
-      post :verify, params
+      post :verify, params: params
 
       expect(response).to redirect_to project_pages_domain_path(project, pages_domain)
       expect(flash[:alert]).to eq('Failed to verify domain ownership')
     end
 
     it 'returns a 404 response for an unknown domain' do
-      post :verify, request_params.merge(id: 'unknown-domain')
+      post :verify, params: request_params.merge(id: 'unknown-domain')
 
       expect(response).to have_gitlab_http_status(404)
     end
@@ -152,7 +152,7 @@ def stub_service
   describe 'DELETE destroy' do
     it "deletes the pages domain" do
       expect do
-        delete(:destroy, request_params.merge(id: pages_domain.domain))
+        delete(:destroy, params: request_params.merge(id: pages_domain.domain))
       end.to change { PagesDomain.count }.by(-1)
 
       expect(response).to redirect_to(project_pages_path(project))
@@ -166,7 +166,7 @@ def stub_service
 
     describe 'GET show' do
       it 'returns 404 status' do
-        get(:show, request_params.merge(id: pages_domain.domain))
+        get(:show, params: request_params.merge(id: pages_domain.domain))
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -174,7 +174,7 @@ def stub_service
 
     describe 'GET new' do
       it 'returns 404 status' do
-        get :new, request_params
+        get :new, params: request_params
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -182,7 +182,7 @@ def stub_service
 
     describe 'POST create' do
       it "returns 404 status" do
-        post(:create, request_params.merge(pages_domain: pages_domain_params))
+        post(:create, params: request_params.merge(pages_domain: pages_domain_params))
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -190,7 +190,7 @@ def stub_service
 
     describe 'DELETE destroy' do
       it "deletes the pages domain" do
-        delete(:destroy, request_params.merge(id: pages_domain.domain))
+        delete(:destroy, params: request_params.merge(id: pages_domain.domain))
 
         expect(response).to have_gitlab_http_status(404)
       end
diff --git a/spec/controllers/projects/pipeline_schedules_controller_spec.rb b/spec/controllers/projects/pipeline_schedules_controller_spec.rb
index 08e2c957d692a3273c9de195b11bdc4d2677ee74..80506249ea9c4e923f239b55c7c7511155934fe3 100644
--- a/spec/controllers/projects/pipeline_schedules_controller_spec.rb
+++ b/spec/controllers/projects/pipeline_schedules_controller_spec.rb
@@ -44,7 +44,7 @@
     end
 
     def visit_pipelines_schedules
-      get :index, namespace_id: project.namespace.to_param, project_id: project, scope: scope
+      get :index, params: { namespace_id: project.namespace.to_param, project_id: project, scope: scope }
     end
   end
 
@@ -57,7 +57,7 @@ def visit_pipelines_schedules
     end
 
     it 'initializes a pipeline schedule model' do
-      get :new, namespace_id: project.namespace.to_param, project_id: project
+      get :new, params: { namespace_id: project.namespace.to_param, project_id: project }
 
       expect(response).to have_gitlab_http_status(:ok)
       expect(assigns(:schedule)).to be_a_new(Ci::PipelineSchedule)
@@ -131,7 +131,7 @@ def visit_pipelines_schedules
     end
 
     def go
-      post :create, namespace_id: project.namespace.to_param, project_id: project, schedule: schedule
+      post :create, params: { namespace_id: project.namespace.to_param, project_id: project, schedule: schedule }
     end
   end
 
@@ -328,7 +328,7 @@ def go
       end
 
       it 'loads the pipeline schedule' do
-        get :edit, namespace_id: project.namespace.to_param, project_id: project, id: pipeline_schedule.id
+        get :edit, params: { namespace_id: project.namespace.to_param, project_id: project, id: pipeline_schedule.id }
 
         expect(response).to have_gitlab_http_status(:ok)
         expect(assigns(:schedule)).to eq(pipeline_schedule)
@@ -348,7 +348,7 @@ def go
     end
 
     def go
-      get :edit, namespace_id: project.namespace.to_param, project_id: project, id: pipeline_schedule.id
+      get :edit, params: { namespace_id: project.namespace.to_param, project_id: project, id: pipeline_schedule.id }
     end
   end
 
@@ -366,7 +366,7 @@ def go
     end
 
     def go
-      post :take_ownership, namespace_id: project.namespace.to_param, project_id: project, id: pipeline_schedule.id
+      post :take_ownership, params: { namespace_id: project.namespace.to_param, project_id: project, id: pipeline_schedule.id }
     end
   end
 
@@ -388,7 +388,7 @@ def go
       it 'does not allow pipeline to be executed' do
         expect(RunPipelineScheduleWorker).not_to receive(:perform_async)
 
-        post :play, namespace_id: project.namespace.to_param, project_id: project, id: pipeline_schedule.id
+        post :play, params: { namespace_id: project.namespace.to_param, project_id: project, id: pipeline_schedule.id }
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -398,7 +398,7 @@ def go
       it 'executes a new pipeline' do
         expect(RunPipelineScheduleWorker).to receive(:perform_async).with(pipeline_schedule.id, user.id).and_return('job-123')
 
-        post :play, namespace_id: project.namespace.to_param, project_id: project, id: pipeline_schedule.id
+        post :play, params: { namespace_id: project.namespace.to_param, project_id: project, id: pipeline_schedule.id }
 
         expect(flash[:notice]).to start_with 'Successfully scheduled a pipeline to run'
         expect(response).to have_gitlab_http_status(302)
@@ -406,7 +406,7 @@ def go
 
       it 'prevents users from scheduling the same pipeline repeatedly' do
         2.times do
-          post :play, namespace_id: project.namespace.to_param, project_id: project, id: pipeline_schedule.id
+          post :play, params: { namespace_id: project.namespace.to_param, project_id: project, id: pipeline_schedule.id }
         end
 
         expect(flash.to_a.size).to eq(2)
@@ -422,7 +422,7 @@ def go
 
         expect(RunPipelineScheduleWorker).not_to receive(:perform_async)
 
-        post :play, namespace_id: project.namespace.to_param, project_id: project, id: protected_schedule.id
+        post :play, params: { namespace_id: project.namespace.to_param, project_id: project, id: protected_schedule.id }
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -437,7 +437,7 @@ def go
         project.add_developer(user)
         sign_in(user)
 
-        delete :destroy, namespace_id: project.namespace.to_param, project_id: project, id: pipeline_schedule.id
+        delete :destroy, params: { namespace_id: project.namespace.to_param, project_id: project, id: pipeline_schedule.id }
       end
 
       it 'does not delete the pipeline schedule' do
@@ -453,7 +453,7 @@ def go
 
       it 'destroys the pipeline schedule' do
         expect do
-          delete :destroy, namespace_id: project.namespace.to_param, project_id: project, id: pipeline_schedule.id
+          delete :destroy, params: { namespace_id: project.namespace.to_param, project_id: project, id: pipeline_schedule.id }
         end.to change { project.pipeline_schedules.count }.by(-1)
 
         expect(response).to have_gitlab_http_status(302)
diff --git a/spec/controllers/projects/pipelines_controller_spec.rb b/spec/controllers/projects/pipelines_controller_spec.rb
index 5c7415a318d2c69ab94759152987f9322060c215..0bb3ef76a3b83d9daaa448a056423289e11451cd 100644
--- a/spec/controllers/projects/pipelines_controller_spec.rb
+++ b/spec/controllers/projects/pipelines_controller_spec.rb
@@ -119,8 +119,10 @@
     end
 
     def get_pipelines_index_json
-      get :index, namespace_id: project.namespace,
-                  project_id: project,
+      get :index, params: {
+                    namespace_id: project.namespace,
+                    project_id: project
+                  },
                   format: :json
     end
 
@@ -185,7 +187,7 @@ def create_build(pipeline, stage, stage_idx, name)
     end
 
     def get_pipeline_json
-      get :show, namespace_id: project.namespace, project_id: project, id: pipeline, format: :json
+      get :show, params: { namespace_id: project.namespace, project_id: project, id: pipeline }, format: :json
     end
 
     def create_build(stage, stage_idx, name)
@@ -240,12 +242,14 @@ def create_build(stage, stage_idx, name)
     end
 
     def get_stage(name, params = {})
-      get :stage, **params.merge(
-        namespace_id: project.namespace,
-        project_id: project,
-        id: pipeline.id,
-        stage: name,
-        format: :json)
+      get :stage, params: {
+**params.merge(
+  namespace_id: project.namespace,
+  project_id: project,
+  id: pipeline.id,
+  stage: name,
+  format: :json)
+}
     end
   end
 
@@ -277,10 +281,12 @@ def get_stage(name, params = {})
     end
 
     def get_stage_ajax(name)
-      get :stage_ajax, namespace_id: project.namespace,
-                       project_id: project,
-                       id: pipeline.id,
-                       stage: name,
+      get :stage_ajax, params: {
+                         namespace_id: project.namespace,
+                         project_id: project,
+                         id: pipeline.id,
+                         stage: name
+                       },
                        format: :json
     end
   end
@@ -290,9 +296,11 @@ def get_stage_ajax(name)
     let(:status) { pipeline.detailed_status(double('user')) }
 
     before do
-      get :status, namespace_id: project.namespace,
-                   project_id: project,
-                   id: pipeline.id,
+      get :status, params: {
+                     namespace_id: project.namespace,
+                     project_id: project,
+                     id: pipeline.id
+                   },
                    format: :json
     end
 
@@ -310,9 +318,11 @@ def get_stage_ajax(name)
     let!(:build) { create(:ci_build, :failed, pipeline: pipeline) }
 
     before do
-      post :retry, namespace_id: project.namespace,
-                   project_id: project,
-                   id: pipeline.id,
+      post :retry, params: {
+                     namespace_id: project.namespace,
+                     project_id: project,
+                     id: pipeline.id
+                   },
                    format: :json
     end
 
@@ -337,9 +347,11 @@ def get_stage_ajax(name)
     let!(:build) { create(:ci_build, :running, pipeline: pipeline) }
 
     before do
-      post :cancel, namespace_id: project.namespace,
-                    project_id: project,
-                    id: pipeline.id,
+      post :cancel, params: {
+                      namespace_id: project.namespace,
+                      project_id: project,
+                      id: pipeline.id
+                    },
                     format: :json
     end
 
diff --git a/spec/controllers/projects/pipelines_settings_controller_spec.rb b/spec/controllers/projects/pipelines_settings_controller_spec.rb
index b1ba9f74e38973299fa91834a7a04bedd62e55d8..269f105bed2bcba8ca4df572a6e937e5806a0016 100644
--- a/spec/controllers/projects/pipelines_settings_controller_spec.rb
+++ b/spec/controllers/projects/pipelines_settings_controller_spec.rb
@@ -13,7 +13,7 @@
 
   describe 'GET show' do
     it 'redirects with 302 status code' do
-      get :show, namespace_id: project.namespace, project_id: project
+      get :show, params: { namespace_id: project.namespace, project_id: project }
 
       expect(response).to have_gitlab_http_status(302)
     end
diff --git a/spec/controllers/projects/project_members_controller_spec.rb b/spec/controllers/projects/project_members_controller_spec.rb
index 519af10d78c25f055518523c812f2f400372b712..009f85903b5a5c1ddd32c8332ae0f8a21a3a262f 100644
--- a/spec/controllers/projects/project_members_controller_spec.rb
+++ b/spec/controllers/projects/project_members_controller_spec.rb
@@ -6,7 +6,7 @@
 
   describe 'GET index' do
     it 'should have the project_members address with a 200 status code' do
-      get :index, namespace_id: project.namespace, project_id: project
+      get :index, params: { namespace_id: project.namespace, project_id: project }
 
       expect(response).to have_gitlab_http_status(200)
     end
@@ -25,10 +25,12 @@
       end
 
       it 'returns 404' do
-        post :create, namespace_id: project.namespace,
-                      project_id: project,
-                      user_ids: project_user.id,
-                      access_level: Gitlab::Access::GUEST
+        post :create, params: {
+                        namespace_id: project.namespace,
+                        project_id: project,
+                        user_ids: project_user.id,
+                        access_level: Gitlab::Access::GUEST
+                      }
 
         expect(response).to have_gitlab_http_status(404)
         expect(project.users).not_to include project_user
@@ -43,10 +45,12 @@
       it 'adds user to members' do
         expect_any_instance_of(Members::CreateService).to receive(:execute).and_return(status: :success)
 
-        post :create, namespace_id: project.namespace,
-                      project_id: project,
-                      user_ids: project_user.id,
-                      access_level: Gitlab::Access::GUEST
+        post :create, params: {
+                        namespace_id: project.namespace,
+                        project_id: project,
+                        user_ids: project_user.id,
+                        access_level: Gitlab::Access::GUEST
+                      }
 
         expect(response).to set_flash.to 'Users were successfully added.'
         expect(response).to redirect_to(project_project_members_path(project))
@@ -55,10 +59,12 @@
       it 'adds no user to members' do
         expect_any_instance_of(Members::CreateService).to receive(:execute).and_return(status: :failure, message: 'Message')
 
-        post :create, namespace_id: project.namespace,
-                      project_id: project,
-                      user_ids: '',
-                      access_level: Gitlab::Access::GUEST
+        post :create, params: {
+                        namespace_id: project.namespace,
+                        project_id: project,
+                        user_ids: '',
+                        access_level: Gitlab::Access::GUEST
+                      }
 
         expect(response).to set_flash.to 'Message'
         expect(response).to redirect_to(project_project_members_path(project))
@@ -95,9 +101,11 @@
 
     context 'when member is not found' do
       it 'returns 404' do
-        delete :destroy, namespace_id: project.namespace,
-                         project_id: project,
-                         id: 42
+        delete :destroy, params: {
+                           namespace_id: project.namespace,
+                           project_id: project,
+                           id: 42
+                         }
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -110,9 +118,11 @@
         end
 
         it 'returns 404' do
-          delete :destroy, namespace_id: project.namespace,
-                           project_id: project,
-                           id: member
+          delete :destroy, params: {
+                             namespace_id: project.namespace,
+                             project_id: project,
+                             id: member
+                           }
 
           expect(response).to have_gitlab_http_status(404)
           expect(project.members).to include member
@@ -125,9 +135,11 @@
         end
 
         it '[HTML] removes user from members' do
-          delete :destroy, namespace_id: project.namespace,
-                           project_id: project,
-                           id: member
+          delete :destroy, params: {
+                             namespace_id: project.namespace,
+                             project_id: project,
+                             id: member
+                           }
 
           expect(response).to redirect_to(
             project_project_members_path(project)
@@ -154,8 +166,10 @@
 
     context 'when member is not found' do
       it 'returns 404' do
-        delete :leave, namespace_id: project.namespace,
-                       project_id: project
+        delete :leave, params: {
+                         namespace_id: project.namespace,
+                         project_id: project
+                       }
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -168,8 +182,10 @@
         end
 
         it 'removes user from members' do
-          delete :leave, namespace_id: project.namespace,
-                         project_id: project
+          delete :leave, params: {
+                           namespace_id: project.namespace,
+                           project_id: project
+                         }
 
           expect(response).to set_flash.to "You left the \"#{project.human_name}\" project."
           expect(response).to redirect_to(dashboard_projects_path)
@@ -185,8 +201,10 @@
         end
 
         it 'cannot remove themselves from the project' do
-          delete :leave, namespace_id: project.namespace,
-                         project_id: project
+          delete :leave, params: {
+                           namespace_id: project.namespace,
+                           project_id: project
+                         }
 
           expect(response).to have_gitlab_http_status(403)
         end
@@ -198,8 +216,10 @@
         end
 
         it 'removes user from members' do
-          delete :leave, namespace_id: project.namespace,
-                         project_id: project
+          delete :leave, params: {
+                           namespace_id: project.namespace,
+                           project_id: project
+                         }
 
           expect(response).to set_flash.to 'Your access request to the project has been withdrawn.'
           expect(response).to redirect_to(project_path(project))
@@ -216,8 +236,10 @@
     end
 
     it 'creates a new ProjectMember that is not a team member' do
-      post :request_access, namespace_id: project.namespace,
-                            project_id: project
+      post :request_access, params: {
+                              namespace_id: project.namespace,
+                              project_id: project
+                            }
 
       expect(response).to set_flash.to 'Your request for access has been queued for review.'
       expect(response).to redirect_to(
@@ -237,9 +259,11 @@
 
     context 'when member is not found' do
       it 'returns 404' do
-        post :approve_access_request, namespace_id: project.namespace,
-                                      project_id: project,
-                                      id: 42
+        post :approve_access_request, params: {
+                                        namespace_id: project.namespace,
+                                        project_id: project,
+                                        id: 42
+                                      }
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -252,9 +276,11 @@
         end
 
         it 'returns 404' do
-          post :approve_access_request, namespace_id: project.namespace,
-                                        project_id: project,
-                                        id: member
+          post :approve_access_request, params: {
+                                          namespace_id: project.namespace,
+                                          project_id: project,
+                                          id: member
+                                        }
 
           expect(response).to have_gitlab_http_status(404)
           expect(project.members).not_to include member
@@ -267,9 +293,11 @@
         end
 
         it 'adds user to members' do
-          post :approve_access_request, namespace_id: project.namespace,
-                                        project_id: project,
-                                        id: member
+          post :approve_access_request, params: {
+                                          namespace_id: project.namespace,
+                                          project_id: project,
+                                          id: member
+                                        }
 
           expect(response).to redirect_to(
             project_project_members_path(project)
@@ -292,9 +320,11 @@
 
     shared_context 'import applied' do
       before do
-        post(:apply_import, namespace_id: project.namespace,
-                            project_id: project,
-                            source_project_id: another_project.id)
+        post(:apply_import, params: {
+                              namespace_id: project.namespace,
+                              project_id: project,
+                              source_project_id: another_project.id
+                            })
       end
     end
 
@@ -338,10 +368,12 @@
 
       it 'does not create a member' do
         expect do
-          post :create, user_ids: stranger.id,
-                        namespace_id: project.namespace,
-                        access_level: Member::OWNER,
-                        project_id: project
+          post :create, params: {
+                          user_ids: stranger.id,
+                          namespace_id: project.namespace,
+                          access_level: Member::OWNER,
+                          project_id: project
+                        }
         end.to change { project.members.count }.by(0)
       end
     end
@@ -354,10 +386,12 @@
 
       it 'creates a member' do
         expect do
-          post :create, user_ids: stranger.id,
-                        namespace_id: project.namespace,
-                        access_level: Member::MAINTAINER,
-                        project_id: project
+          post :create, params: {
+                          user_ids: stranger.id,
+                          namespace_id: project.namespace,
+                          access_level: Member::MAINTAINER,
+                          project_id: project
+                        }
         end.to change { project.members.count }.by(1)
       end
     end
diff --git a/spec/controllers/projects/prometheus/metrics_controller_spec.rb b/spec/controllers/projects/prometheus/metrics_controller_spec.rb
index 5c56a712245640f0b754702b89df535ec4d63a36..635763ce1d317eb40332cd8bd7adba656b0f9266 100644
--- a/spec/controllers/projects/prometheus/metrics_controller_spec.rb
+++ b/spec/controllers/projects/prometheus/metrics_controller_spec.rb
@@ -24,7 +24,7 @@
           end
 
           it 'returns no content response' do
-            get :active_common, project_params(format: :json)
+            get :active_common, params: project_params(format: :json)
 
             expect(response).to have_gitlab_http_status(204)
           end
@@ -38,7 +38,7 @@
           end
 
           it 'returns no content response' do
-            get :active_common, project_params(format: :json)
+            get :active_common, params: project_params(format: :json)
 
             expect(response).to have_gitlab_http_status(200)
             expect(json_response).to eq(sample_response.deep_stringify_keys)
@@ -47,7 +47,7 @@
 
         context 'when requesting non json response' do
           it 'returns not found response' do
-            get :active_common, project_params
+            get :active_common, params: project_params
 
             expect(response).to have_gitlab_http_status(404)
           end
@@ -62,7 +62,7 @@
         allow(controller).to receive(:prometheus_adapter).and_return(prometheus_adapter)
         allow(prometheus_adapter).to receive(:query).with(:matched_metrics).and_return({})
 
-        get :active_common, project_params(format: :json)
+        get :active_common, params: project_params(format: :json)
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -70,7 +70,7 @@
 
     context 'when prometheus_adapter is disabled' do
       it 'renders 404' do
-        get :active_common, project_params(format: :json)
+        get :active_common, params: project_params(format: :json)
 
         expect(response).to have_gitlab_http_status(404)
       end
diff --git a/spec/controllers/projects/protected_branches_controller_spec.rb b/spec/controllers/projects/protected_branches_controller_spec.rb
index ac812707e74c335fcfdf907a3d413e27289e2ecc..483d3bbc37c04e6047e52e52a7c1e92f7bed06da 100644
--- a/spec/controllers/projects/protected_branches_controller_spec.rb
+++ b/spec/controllers/projects/protected_branches_controller_spec.rb
@@ -15,7 +15,7 @@
     let(:project) { create(:project_empty_repo, :public) }
 
     it "redirects empty repo to projects page" do
-      get(:index, namespace_id: project.namespace.to_param, project_id: project)
+      get(:index, params: { namespace_id: project.namespace.to_param, project_id: project })
     end
   end
 
@@ -33,7 +33,7 @@
 
     it 'creates the protected branch rule' do
       expect do
-        post(:create, project_params.merge(protected_branch: create_params))
+        post(:create, params: project_params.merge(protected_branch: create_params))
       end.to change(ProtectedBranch, :count).by(1)
     end
 
@@ -44,7 +44,7 @@
       end
 
       it "prevents creation of the protected branch rule" do
-        post(:create, project_params.merge(protected_branch: create_params))
+        post(:create, params: project_params.merge(protected_branch: create_params))
 
         expect(ProtectedBranch.count).to eq 0
       end
@@ -59,7 +59,7 @@
     end
 
     it 'updates the protected branch rule' do
-      put(:update, base_params.merge(protected_branch: update_params))
+      put(:update, params: base_params.merge(protected_branch: update_params))
 
       expect(protected_branch.reload.name).to eq('new_name')
       expect(json_response["name"]).to eq('new_name')
@@ -74,7 +74,7 @@
       it "prevents update of the protected branch rule" do
         old_name = protected_branch.name
 
-        put(:update, base_params.merge(protected_branch: update_params))
+        put(:update, params: base_params.merge(protected_branch: update_params))
 
         expect(protected_branch.reload.name).to eq(old_name)
       end
@@ -87,7 +87,7 @@
     end
 
     it "deletes the protected branch rule" do
-      delete(:destroy, base_params)
+      delete(:destroy, params: base_params)
 
       expect { ProtectedBranch.find(protected_branch.id) }.to raise_error(ActiveRecord::RecordNotFound)
     end
@@ -99,7 +99,7 @@
       end
 
       it "prevents deletion of the protected branch rule" do
-        delete(:destroy, base_params)
+        delete(:destroy, params: base_params)
 
         expect(response.status).to eq(403)
       end
diff --git a/spec/controllers/projects/protected_tags_controller_spec.rb b/spec/controllers/projects/protected_tags_controller_spec.rb
index 20440c5a5d5639fc80ba125be6aefed1dc86500b..1553e081dee2d18c5d1bd5fb739a111a0b89943c 100644
--- a/spec/controllers/projects/protected_tags_controller_spec.rb
+++ b/spec/controllers/projects/protected_tags_controller_spec.rb
@@ -5,7 +5,7 @@
     let(:project) { create(:project_empty_repo, :public) }
 
     it "redirects empty repo to projects page" do
-      get(:index, namespace_id: project.namespace.to_param, project_id: project)
+      get(:index, params: { namespace_id: project.namespace.to_param, project_id: project })
     end
   end
 
@@ -20,7 +20,7 @@
     end
 
     it "deletes the protected tag" do
-      delete(:destroy, namespace_id: project.namespace.to_param, project_id: project, id: protected_tag.id)
+      delete(:destroy, params: { namespace_id: project.namespace.to_param, project_id: project, id: protected_tag.id })
 
       expect { ProtectedTag.find(protected_tag.id) }.to raise_error(ActiveRecord::RecordNotFound)
     end
diff --git a/spec/controllers/projects/raw_controller_spec.rb b/spec/controllers/projects/raw_controller_spec.rb
index d3cd15fbcd79541888791146bcfd5642738c8972..24e2441cf9d4fef86d6a561acf134310c5571706 100644
--- a/spec/controllers/projects/raw_controller_spec.rb
+++ b/spec/controllers/projects/raw_controller_spec.rb
@@ -6,9 +6,11 @@
   describe 'GET #show' do
     subject do
       get(:show,
-          namespace_id: project.namespace,
-          project_id: project,
-          id: filepath)
+          params: {
+            namespace_id: project.namespace,
+            project_id: project,
+            id: filepath
+          })
     end
 
     context 'regular filename' do
diff --git a/spec/controllers/projects/refs_controller_spec.rb b/spec/controllers/projects/refs_controller_spec.rb
index ceaffd9262321f6f735d20a6e6289778dd241937..ea299e1e8c5353d21eedc28c6cd3946710e651d8 100644
--- a/spec/controllers/projects/refs_controller_spec.rb
+++ b/spec/controllers/projects/refs_controller_spec.rb
@@ -12,10 +12,12 @@
   describe 'GET #logs_tree' do
     def default_get(format = :html)
       get :logs_tree,
-          namespace_id: project.namespace.to_param,
-          project_id: project,
-          id: 'master',
-          path: 'foo/bar/baz.html',
+          params: {
+            namespace_id: project.namespace.to_param,
+            project_id: project,
+            id: 'master',
+            path: 'foo/bar/baz.html'
+          },
           format: format
     end
 
diff --git a/spec/controllers/projects/registry/repositories_controller_spec.rb b/spec/controllers/projects/registry/repositories_controller_spec.rb
index d11e42b411bc634bed109e1ba3ea51d85e523886..eca187af33de67d8351c4803b6f33e773a8d9f1a 100644
--- a/spec/controllers/projects/registry/repositories_controller_spec.rb
+++ b/spec/controllers/projects/registry/repositories_controller_spec.rb
@@ -111,15 +111,19 @@
   end
 
   def go_to_index(format: :html)
-    get :index, namespace_id: project.namespace,
-                project_id: project,
+    get :index, params: {
+                  namespace_id: project.namespace,
+                  project_id: project
+                },
                 format: format
   end
 
   def delete_repository(repository)
-    delete :destroy, namespace_id: project.namespace,
-                     project_id: project,
-                     id: repository,
+    delete :destroy, params: {
+                       namespace_id: project.namespace,
+                       project_id: project,
+                       id: repository
+                     },
                      format: :json
   end
 end
diff --git a/spec/controllers/projects/registry/tags_controller_spec.rb b/spec/controllers/projects/registry/tags_controller_spec.rb
index 7fee8fd44ff2372a329e5ca7c2331e82684e1c73..ed0197afcfc517c38715583eb69b77ef800de0fa 100644
--- a/spec/controllers/projects/registry/tags_controller_spec.rb
+++ b/spec/controllers/projects/registry/tags_controller_spec.rb
@@ -65,9 +65,11 @@
     private
 
     def get_tags
-      get :index, namespace_id: project.namespace,
-                  project_id: project,
-                  repository_id: repository,
+      get :index, params: {
+                    namespace_id: project.namespace,
+                    project_id: project,
+                    repository_id: repository
+                  },
                   format: :json
     end
   end
@@ -100,10 +102,12 @@ def get_tags
     private
 
     def destroy_tag(name)
-      post :destroy, namespace_id: project.namespace,
-                     project_id: project,
-                     repository_id: repository,
-                     id: name,
+      post :destroy, params: {
+                       namespace_id: project.namespace,
+                       project_id: project,
+                       repository_id: repository,
+                       id: name
+                     },
                      format: :json
     end
   end
diff --git a/spec/controllers/projects/releases_controller_spec.rb b/spec/controllers/projects/releases_controller_spec.rb
index d9fb6e0d8381d3a1de3b3ad8f4e4fc1cca9384da..f170a2ab61321f3ac5f00b8e046e2b8dfca97593 100644
--- a/spec/controllers/projects/releases_controller_spec.rb
+++ b/spec/controllers/projects/releases_controller_spec.rb
@@ -60,6 +60,6 @@
   private
 
   def get_index
-    get :index, namespace_id: project.namespace, project_id: project
+    get :index, params: { namespace_id: project.namespace, project_id: project }
   end
 end
diff --git a/spec/controllers/projects/repositories_controller_spec.rb b/spec/controllers/projects/repositories_controller_spec.rb
index a102a3a3c8c61cb35d1d016c53b304888b0a0b86..5f4f6f8558fb6b12ffe817be12de513c4659c831 100644
--- a/spec/controllers/projects/repositories_controller_spec.rb
+++ b/spec/controllers/projects/repositories_controller_spec.rb
@@ -6,7 +6,7 @@
   describe "GET archive" do
     context 'as a guest' do
       it 'responds with redirect in correct format' do
-        get :archive, namespace_id: project.namespace, project_id: project, id: "master", format: "zip"
+        get :archive, params: { namespace_id: project.namespace, project_id: project, id: "master" }, format: "zip"
 
         expect(response.header["Content-Type"]).to start_with('text/html')
         expect(response).to be_redirect
@@ -22,26 +22,26 @@
       end
 
       it "uses Gitlab::Workhorse" do
-        get :archive, namespace_id: project.namespace, project_id: project, id: "master", format: "zip"
+        get :archive, params: { namespace_id: project.namespace, project_id: project, id: "master" }, format: "zip"
 
         expect(response.header[Gitlab::Workhorse::SEND_DATA_HEADER]).to start_with("git-archive:")
       end
 
       it 'responds with redirect to the short name archive if fully qualified' do
-        get :archive, namespace_id: project.namespace, project_id: project, id: "master/#{project.path}-master", format: "zip"
+        get :archive, params: { namespace_id: project.namespace, project_id: project, id: "master/#{project.path}-master" }, format: "zip"
 
         expect(assigns(:ref)).to eq("master")
         expect(response.header[Gitlab::Workhorse::SEND_DATA_HEADER]).to start_with("git-archive:")
       end
 
       it 'handles legacy queries with no ref' do
-        get :archive, namespace_id: project.namespace, project_id: project, format: "zip"
+        get :archive, params: { namespace_id: project.namespace, project_id: project }, format: "zip"
 
         expect(response.header[Gitlab::Workhorse::SEND_DATA_HEADER]).to start_with("git-archive:")
       end
 
       it 'handles legacy queries with the ref specified as ref in params' do
-        get :archive, namespace_id: project.namespace, project_id: project, ref: 'feature', format: 'zip'
+        get :archive, params: { namespace_id: project.namespace, project_id: project, ref: 'feature' }, format: 'zip'
 
         expect(response).to have_gitlab_http_status(200)
         expect(assigns(:ref)).to eq('feature')
@@ -49,7 +49,7 @@
       end
 
       it 'handles legacy queries with the ref specified as id in params' do
-        get :archive, namespace_id: project.namespace, project_id: project, id: 'feature', format: 'zip'
+        get :archive, params: { namespace_id: project.namespace, project_id: project, id: 'feature' }, format: 'zip'
 
         expect(response).to have_gitlab_http_status(200)
         expect(assigns(:ref)).to eq('feature')
@@ -57,7 +57,7 @@
       end
 
       it 'prioritizes the id param over the ref param when both are specified' do
-        get :archive, namespace_id: project.namespace, project_id: project, id: 'feature', ref: 'feature_conflict', format: 'zip'
+        get :archive, params: { namespace_id: project.namespace, project_id: project, id: 'feature', ref: 'feature_conflict' }, format: 'zip'
 
         expect(response).to have_gitlab_http_status(200)
         expect(assigns(:ref)).to eq('feature')
@@ -70,7 +70,7 @@
         end
 
         it "renders Not Found" do
-          get :archive, namespace_id: project.namespace, project_id: project, id: "master", format: "zip"
+          get :archive, params: { namespace_id: project.namespace, project_id: project, id: "master" }, format: "zip"
 
           expect(response).to have_gitlab_http_status(404)
         end
diff --git a/spec/controllers/projects/runners_controller_spec.rb b/spec/controllers/projects/runners_controller_spec.rb
index b1e0b496ede1158f3b41101c9543cb081f97499d..0baaa4e7192b3059a1d93ae63767f28bacd93b4f 100644
--- a/spec/controllers/projects/runners_controller_spec.rb
+++ b/spec/controllers/projects/runners_controller_spec.rb
@@ -23,7 +23,7 @@
       new_desc = runner.description.swapcase
 
       expect do
-        post :update, params.merge(runner: { description: new_desc } )
+        post :update, params: params.merge(runner: { description: new_desc } )
       end.to change { runner.ensure_runner_queue_value }
 
       runner.reload
@@ -35,7 +35,7 @@
 
   describe '#destroy' do
     it 'destroys the runner' do
-      delete :destroy, params
+      delete :destroy, params: params
 
       expect(response).to have_gitlab_http_status(302)
       expect(Ci::Runner.find_by(id: runner.id)).to be_nil
@@ -47,7 +47,7 @@
       runner.update(active: false)
 
       expect do
-        post :resume, params
+        post :resume, params: params
       end.to change { runner.ensure_runner_queue_value }
 
       runner.reload
@@ -62,7 +62,7 @@
       runner.update(active: true)
 
       expect do
-        post :pause, params
+        post :pause, params: params
       end.to change { runner.ensure_runner_queue_value }
 
       runner.reload
diff --git a/spec/controllers/projects/serverless/functions_controller_spec.rb b/spec/controllers/projects/serverless/functions_controller_spec.rb
index 284b582b1f5caf1765f510d6133fbf67176e4d63..a9759c4fbd83c9fae705e487529a16b53fe7bf7b 100644
--- a/spec/controllers/projects/serverless/functions_controller_spec.rb
+++ b/spec/controllers/projects/serverless/functions_controller_spec.rb
@@ -32,13 +32,13 @@ def params(opts = {})
   describe 'GET #index' do
     context 'empty cache' do
       it 'has no data' do
-        get :index, params({ format: :json })
+        get :index, params: params({ format: :json })
 
         expect(response).to have_gitlab_http_status(204)
       end
 
       it 'renders an html page' do
-        get :index, params
+        get :index, params: params
 
         expect(response).to have_gitlab_http_status(200)
       end
@@ -51,7 +51,7 @@ def params(opts = {})
     end
 
     it 'has data' do
-      get :index, params({ format:  :json })
+      get :index, params: params({ format:  :json })
 
       expect(response).to have_gitlab_http_status(200)
 
@@ -64,7 +64,7 @@ def params(opts = {})
     end
 
     it 'has data in html' do
-      get :index, params
+      get :index, params: params
 
       expect(response).to have_gitlab_http_status(200)
     end
diff --git a/spec/controllers/projects/services_controller_spec.rb b/spec/controllers/projects/services_controller_spec.rb
index 0941af6779fc8163b047cd95dbc4f2cd62709a24..4a5d2bdecb7f914f2e0381b3f98710a84f31bd1e 100644
--- a/spec/controllers/projects/services_controller_spec.rb
+++ b/spec/controllers/projects/services_controller_spec.rb
@@ -16,7 +16,7 @@
       it 'renders 404' do
         allow_any_instance_of(Service).to receive(:can_test?).and_return(false)
 
-        put :test, namespace_id: project.namespace, project_id: project, id: service.to_param
+        put :test, params: { namespace_id: project.namespace, project_id: project, id: service.to_param }
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -26,7 +26,7 @@
       let(:service_params) { { active: 'true', url: '' } }
 
       it 'returns error messages in JSON response' do
-        put :test, namespace_id: project.namespace, project_id: project, id: service.to_param, service: service_params
+        put :test, params: { namespace_id: project.namespace, project_id: project, id: service.to_param, service: service_params }
 
         expect(json_response['message']).to eq "Validations failed."
         expect(json_response['service_response']).to include "Url can't be blank"
@@ -44,7 +44,7 @@
           it 'returns success' do
             allow_any_instance_of(MicrosoftTeams::Notifier).to receive(:ping).and_return(true)
 
-            put :test, namespace_id: project.namespace, project_id: project, id: service.to_param
+            put :test, params: { namespace_id: project.namespace, project_id: project, id: service.to_param }
 
             expect(response.status).to eq(200)
           end
@@ -54,7 +54,7 @@
           stub_request(:get, 'http://example.com/rest/api/2/serverInfo')
             .to_return(status: 200, body: '{}')
 
-          put :test, namespace_id: project.namespace, project_id: project, id: service.to_param, service: service_params
+          put :test, params: { namespace_id: project.namespace, project_id: project, id: service.to_param, service: service_params }
 
           expect(response.status).to eq(200)
         end
@@ -64,7 +64,7 @@
         stub_request(:get, 'http://example.com/rest/api/2/serverInfo')
           .to_return(status: 200, body: '{}')
 
-        put :test, namespace_id: project.namespace, project_id: project, id: service.to_param, service: service_params
+        put :test, params: { namespace_id: project.namespace, project_id: project, id: service.to_param, service: service_params }
 
         expect(response.status).to eq(200)
       end
@@ -91,10 +91,12 @@
         end
 
         def do_put
-          put :test, namespace_id: project.namespace,
-                     project_id: project,
-                     id: 'buildkite',
-                     service: { 'active' => '1', 'push_events' => '1', token: 'token', 'project_url' => 'http://test.com' }
+          put :test, params: {
+                       namespace_id: project.namespace,
+                       project_id: project,
+                       id: 'buildkite',
+                       service: { 'active' => '1', 'push_events' => '1', token: 'token', 'project_url' => 'http://test.com' }
+                     }
         end
       end
     end
@@ -104,7 +106,7 @@ def do_put
         stub_request(:get, 'http://example.com/rest/api/2/serverInfo')
           .to_return(status: 404)
 
-        put :test, namespace_id: project.namespace, project_id: project, id: service.to_param, service: service_params
+        put :test, params: { namespace_id: project.namespace, project_id: project, id: service.to_param, service: service_params }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response).to eq(
@@ -121,7 +123,7 @@ def do_put
     context 'when param `active` is set to true' do
       it 'activates the service and redirects to integrations paths' do
         put :update,
-          namespace_id: project.namespace, project_id: project, id: service.to_param, service: { active: true }
+          params: { namespace_id: project.namespace, project_id: project, id: service.to_param, service: { active: true } }
 
         expect(response).to redirect_to(project_settings_integrations_path(project))
         expect(flash[:notice]).to eq 'JIRA activated.'
@@ -131,7 +133,7 @@ def do_put
     context 'when param `active` is set to false' do
       it 'does not  activate the service but saves the settings' do
         put :update,
-          namespace_id: project.namespace, project_id: project, id: service.to_param, service: { active: false }
+          params: { namespace_id: project.namespace, project_id: project, id: service.to_param, service: { active: false } }
 
         expect(flash[:notice]).to eq 'JIRA settings saved, but not activated.'
       end
@@ -142,7 +144,7 @@ def do_put
 
       before do
         put :update,
-          namespace_id: project.namespace, project_id: project, id: service.to_param, service: { namespace: 'updated_namespace' }
+          params: { namespace_id: project.namespace, project_id: project, id: service.to_param, service: { namespace: 'updated_namespace' } }
       end
 
       it 'should not update the service' do
@@ -154,7 +156,7 @@ def do_put
 
   describe "GET #edit" do
     before do
-      get :edit, namespace_id: project.namespace, project_id: project, id: service_id
+      get :edit, params: { namespace_id: project.namespace, project_id: project, id: service_id }
     end
 
     context 'with approved services' do
diff --git a/spec/controllers/projects/settings/ci_cd_controller_spec.rb b/spec/controllers/projects/settings/ci_cd_controller_spec.rb
index 4629929f9aff1f6919d728cc3ca63a3968576feb..41cc0607cee20716a07c6216decadaf3593feefa 100644
--- a/spec/controllers/projects/settings/ci_cd_controller_spec.rb
+++ b/spec/controllers/projects/settings/ci_cd_controller_spec.rb
@@ -12,7 +12,7 @@
 
   describe 'GET show' do
     it 'renders show with 200 status code' do
-      get :show, namespace_id: project.namespace, project_id: project
+      get :show, params: { namespace_id: project.namespace, project_id: project }
 
       expect(response).to have_gitlab_http_status(200)
       expect(response).to render_template(:show)
@@ -29,7 +29,7 @@
       it 'sets assignable project runners only' do
         group.add_maintainer(user)
 
-        get :show, namespace_id: project.namespace, project_id: project
+        get :show, params: { namespace_id: project.namespace, project_id: project }
 
         expect(assigns(:assignable_runners)).to contain_exactly(project_runner)
       end
@@ -45,7 +45,7 @@
       allow(ResetProjectCacheService).to receive_message_chain(:new, :execute).and_return(true)
     end
 
-    subject { post :reset_cache, namespace_id: project.namespace, project_id: project, format: :json }
+    subject { post :reset_cache, params: { namespace_id: project.namespace, project_id: project }, format: :json }
 
     it 'calls reset project cache service' do
       expect(ResetProjectCacheService).to receive_message_chain(:new, :execute)
@@ -75,7 +75,7 @@
   end
 
   describe 'PUT #reset_registration_token' do
-    subject { put :reset_registration_token, namespace_id: project.namespace, project_id: project }
+    subject { put :reset_registration_token, params: { namespace_id: project.namespace, project_id: project } }
     it 'resets runner registration token' do
       expect { subject }.to change { project.reload.runners_token }
     end
@@ -92,9 +92,11 @@
 
     subject do
       patch :update,
-            namespace_id: project.namespace.to_param,
-            project_id: project,
-            project: params
+            params: {
+              namespace_id: project.namespace.to_param,
+              project_id: project,
+              project: params
+            }
     end
 
     it 'redirects to the settings page' do
diff --git a/spec/controllers/projects/settings/integrations_controller_spec.rb b/spec/controllers/projects/settings/integrations_controller_spec.rb
index a2484c04c7ab2e1ec9f245ffef6a66f2f26c1736..8624eb4d1a0565b8527cd9c4e384047e2a5e335e 100644
--- a/spec/controllers/projects/settings/integrations_controller_spec.rb
+++ b/spec/controllers/projects/settings/integrations_controller_spec.rb
@@ -11,7 +11,7 @@
 
   describe 'GET show' do
     it 'renders show with 200 status code' do
-      get :show, namespace_id: project.namespace, project_id: project
+      get :show, params: { namespace_id: project.namespace, project_id: project }
 
       expect(response).to have_gitlab_http_status(200)
       expect(response).to render_template(:show)
diff --git a/spec/controllers/projects/settings/repository_controller_spec.rb b/spec/controllers/projects/settings/repository_controller_spec.rb
index 1c6ddfc1864a9d0f0eb9fc238170e2a07c6896cd..638cce60a25850080c61e4cd9c9742224d5a797d 100644
--- a/spec/controllers/projects/settings/repository_controller_spec.rb
+++ b/spec/controllers/projects/settings/repository_controller_spec.rb
@@ -11,7 +11,7 @@
 
   describe 'GET show' do
     it 'renders show with 200 status code' do
-      get :show, namespace_id: project.namespace, project_id: project
+      get :show, params: { namespace_id: project.namespace, project_id: project }
 
       expect(response).to have_gitlab_http_status(200)
       expect(response).to render_template(:show)
@@ -24,7 +24,7 @@
     it 'enqueues a RepositoryCleanupWorker' do
       allow(RepositoryCleanupWorker).to receive(:perform_async)
 
-      put :cleanup, namespace_id: project.namespace, project_id: project, project: { object_map: object_map }
+      put :cleanup, params: { namespace_id: project.namespace, project_id: project, project: { object_map: object_map } }
 
       expect(response).to redirect_to project_settings_repository_path(project)
       expect(RepositoryCleanupWorker).to have_received(:perform_async).once
diff --git a/spec/controllers/projects/snippets_controller_spec.rb b/spec/controllers/projects/snippets_controller_spec.rb
index 9c383bd7628e337b973a52be7f4b79a6287e4e6b..1a3fb4da15f871990f5f2462c62390f69bd865e0 100644
--- a/spec/controllers/projects/snippets_controller_spec.rb
+++ b/spec/controllers/projects/snippets_controller_spec.rb
@@ -17,16 +17,22 @@
 
       it 'redirects to last_page if page number is larger than number of pages' do
         get :index,
-          namespace_id: project.namespace,
-          project_id: project, page: (last_page + 1).to_param
+          params: {
+            namespace_id: project.namespace,
+            project_id: project,
+            page: (last_page + 1).to_param
+          }
 
         expect(response).to redirect_to(namespace_project_snippets_path(page: last_page))
       end
 
       it 'redirects to specified page' do
         get :index,
-          namespace_id: project.namespace,
-          project_id: project, page: last_page.to_param
+          params: {
+            namespace_id: project.namespace,
+            project_id: project,
+            page: last_page.to_param
+          }
 
         expect(assigns(:snippets).current_page).to eq(last_page)
         expect(response).to have_gitlab_http_status(200)
@@ -38,7 +44,7 @@
 
       context 'when anonymous' do
         it 'does not include the private snippet' do
-          get :index, namespace_id: project.namespace, project_id: project
+          get :index, params: { namespace_id: project.namespace, project_id: project }
 
           expect(assigns(:snippets)).not_to include(project_snippet)
           expect(response).to have_gitlab_http_status(200)
@@ -51,7 +57,7 @@
         end
 
         it 'renders the snippet' do
-          get :index, namespace_id: project.namespace, project_id: project
+          get :index, params: { namespace_id: project.namespace, project_id: project }
 
           expect(assigns(:snippets)).to include(project_snippet)
           expect(response).to have_gitlab_http_status(200)
@@ -64,7 +70,7 @@
         end
 
         it 'renders the snippet' do
-          get :index, namespace_id: project.namespace, project_id: project
+          get :index, params: { namespace_id: project.namespace, project_id: project }
 
           expect(assigns(:snippets)).to include(project_snippet)
           expect(response).to have_gitlab_http_status(200)
@@ -79,7 +85,7 @@ def create_snippet(project, snippet_params = {}, additional_params = {})
 
       project.add_developer(user)
 
-      post :create, {
+      post :create, params: {
         namespace_id: project.namespace.to_param,
         project_id: project,
         project_snippet: { title: 'Title', content: 'Content', description: 'Description' }.merge(snippet_params)
@@ -164,7 +170,7 @@ def update_snippet(snippet_params = {}, additional_params = {})
 
       project.add_developer(user)
 
-      put :update, {
+      put :update, params: {
         namespace_id: project.namespace.to_param,
         project_id: project,
         id: snippet.id,
@@ -295,9 +301,11 @@ def mark_as_spam
       sign_in(admin)
 
       post :mark_as_spam,
-           namespace_id: project.namespace,
-           project_id: project,
-           id: snippet.id
+           params: {
+             namespace_id: project.namespace,
+             project_id: project,
+             id: snippet.id
+           }
     end
 
     it 'updates the snippet' do
@@ -314,7 +322,7 @@ def mark_as_spam
 
         context 'when anonymous' do
           it 'responds with status 404' do
-            get action, namespace_id: project.namespace, project_id: project, id: project_snippet.to_param
+            get action, params: { namespace_id: project.namespace, project_id: project, id: project_snippet.to_param }
 
             expect(response).to have_gitlab_http_status(404)
           end
@@ -326,7 +334,7 @@ def mark_as_spam
           end
 
           it 'renders the snippet' do
-            get action, namespace_id: project.namespace, project_id: project, id: project_snippet.to_param
+            get action, params: { namespace_id: project.namespace, project_id: project, id: project_snippet.to_param }
 
             expect(assigns(:snippet)).to eq(project_snippet)
             expect(response).to have_gitlab_http_status(200)
@@ -339,7 +347,7 @@ def mark_as_spam
           end
 
           it 'renders the snippet' do
-            get action, namespace_id: project.namespace, project_id: project, id: project_snippet.to_param
+            get action, params: { namespace_id: project.namespace, project_id: project, id: project_snippet.to_param }
 
             expect(assigns(:snippet)).to eq(project_snippet)
             expect(response).to have_gitlab_http_status(200)
@@ -350,7 +358,7 @@ def mark_as_spam
       context 'when the project snippet does not exist' do
         context 'when anonymous' do
           it 'responds with status 404' do
-            get action, namespace_id: project.namespace, project_id: project, id: 42
+            get action, params: { namespace_id: project.namespace, project_id: project, id: 42 }
 
             expect(response).to have_gitlab_http_status(404)
           end
@@ -362,7 +370,7 @@ def mark_as_spam
           end
 
           it 'responds with status 404' do
-            get action, namespace_id: project.namespace, project_id: project, id: 42
+            get action, params: { namespace_id: project.namespace, project_id: project, id: 42 }
 
             expect(response).to have_gitlab_http_status(404)
           end
@@ -391,13 +399,13 @@ def mark_as_spam
       end
 
       it 'returns LF line endings by default' do
-        get :raw, params
+        get :raw, params: params
 
         expect(response.body).to eq("first line\nsecond line\nthird line")
       end
 
       it 'does not convert line endings when parameter present' do
-        get :raw, params.merge(line_ending: :raw)
+        get :raw, params: params.merge(line_ending: :raw)
 
         expect(response.body).to eq("first line\r\nsecond line\r\nthird line")
       end
diff --git a/spec/controllers/projects/tags_controller_spec.rb b/spec/controllers/projects/tags_controller_spec.rb
index 6fbf75d025963bdf7018b43ae2659e9e17062ac6..379430bff3b8998486a979d7829c9ee2a0964e6c 100644
--- a/spec/controllers/projects/tags_controller_spec.rb
+++ b/spec/controllers/projects/tags_controller_spec.rb
@@ -7,7 +7,7 @@
 
   describe 'GET index' do
     before do
-      get :index, namespace_id: project.namespace.to_param, project_id: project
+      get :index, params: { namespace_id: project.namespace.to_param, project_id: project }
     end
 
     it 'returns the tags for the page' do
@@ -22,7 +22,7 @@
 
   describe 'GET show' do
     before do
-      get :show, namespace_id: project.namespace.to_param, project_id: project, id: id
+      get :show, params: { namespace_id: project.namespace.to_param, project_id: project, id: id }
     end
 
     context "valid tag" do
diff --git a/spec/controllers/projects/templates_controller_spec.rb b/spec/controllers/projects/templates_controller_spec.rb
index d7f07aa2b019ca70c3c783560d72d850b82f2848..01e53669627185ab0bc6dd0503ae49d86b4143cf 100644
--- a/spec/controllers/projects/templates_controller_spec.rb
+++ b/spec/controllers/projects/templates_controller_spec.rb
@@ -20,7 +20,7 @@
 
   describe '#show' do
     it 'renders template name and content as json' do
-      get(:show, namespace_id: project.namespace.to_param, template_type: "issue", key: "bug", project_id: project, format: :json)
+      get(:show, params: { namespace_id: project.namespace.to_param, template_type: "issue", key: "bug", project_id: project }, format: :json)
 
       expect(response.status).to eq(200)
       expect(body["name"]).to eq("bug")
@@ -29,21 +29,21 @@
 
     it 'renders 404 when unauthorized' do
       sign_in(user2)
-      get(:show, namespace_id: project.namespace.to_param, template_type: "issue", key: "bug", project_id: project, format: :json)
+      get(:show, params: { namespace_id: project.namespace.to_param, template_type: "issue", key: "bug", project_id: project }, format: :json)
 
       expect(response.status).to eq(404)
     end
 
     it 'renders 404 when template type is not found' do
       sign_in(user)
-      get(:show, namespace_id: project.namespace.to_param, template_type: "dont_exist", key: "bug", project_id: project, format: :json)
+      get(:show, params: { namespace_id: project.namespace.to_param, template_type: "dont_exist", key: "bug", project_id: project }, format: :json)
 
       expect(response.status).to eq(404)
     end
 
     it 'renders 404 without errors' do
       sign_in(user)
-      expect { get(:show, namespace_id: project.namespace.to_param, template_type: "dont_exist", key: "bug", project_id: project, format: :json) }.not_to raise_error
+      expect { get(:show, params: { namespace_id: project.namespace.to_param, template_type: "dont_exist", key: "bug", project_id: project }, format: :json) }.not_to raise_error
     end
   end
 end
diff --git a/spec/controllers/projects/todos_controller_spec.rb b/spec/controllers/projects/todos_controller_spec.rb
index 58f2817c7cc33e03f5809c4e44149405c9a5f206..987772f38aa47035c93637cdcbeeab8e63a96267 100644
--- a/spec/controllers/projects/todos_controller_spec.rb
+++ b/spec/controllers/projects/todos_controller_spec.rb
@@ -29,10 +29,12 @@
     describe 'POST create' do
       def post_create
         post :create,
-          namespace_id: project.namespace,
-          project_id: project,
-          issuable_id: issue.id,
-          issuable_type: 'issue',
+          params: {
+            namespace_id: project.namespace,
+            project_id: project,
+            issuable_id: issue.id,
+            issuable_type: 'issue'
+          },
           format: 'html'
       end
 
@@ -44,10 +46,12 @@ def post_create
     describe 'POST create' do
       def post_create
         post :create,
-          namespace_id: project.namespace,
-          project_id: project,
-          issuable_id: merge_request.id,
-          issuable_type: 'merge_request',
+          params: {
+            namespace_id: project.namespace,
+            project_id: project,
+            issuable_id: merge_request.id,
+            issuable_type: 'merge_request'
+          },
           format: 'html'
       end
 
diff --git a/spec/controllers/projects/tree_controller_spec.rb b/spec/controllers/projects/tree_controller_spec.rb
index 9982b49eebbd78aa3917fc44361ecb794c355587..b15a2bc84a51401c06971cfce61dd8aa1a6f2574 100644
--- a/spec/controllers/projects/tree_controller_spec.rb
+++ b/spec/controllers/projects/tree_controller_spec.rb
@@ -17,9 +17,11 @@
 
     before do
       get(:show,
-          namespace_id: project.namespace.to_param,
-          project_id: project,
-          id: id)
+          params: {
+            namespace_id: project.namespace.to_param,
+            project_id: project,
+            id: id
+          })
     end
 
     context "valid branch, no path" do
@@ -73,9 +75,11 @@
 
     before do
       get(:show,
-          namespace_id: project.namespace.to_param,
-          project_id: project,
-          id: id)
+          params: {
+            namespace_id: project.namespace.to_param,
+            project_id: project,
+            id: id
+          })
     end
 
     context 'redirect to blob' do
@@ -93,12 +97,14 @@
 
     before do
       post(:create_dir,
-           namespace_id: project.namespace.to_param,
-           project_id: project,
-           id: 'master',
-           dir_name: path,
-           branch_name: branch_name,
-           commit_message: 'Test commit message')
+           params: {
+             namespace_id: project.namespace.to_param,
+             project_id: project,
+             id: 'master',
+             dir_name: path,
+             branch_name: branch_name,
+             commit_message: 'Test commit message'
+           })
     end
 
     context 'successful creation' do
diff --git a/spec/controllers/projects/uploads_controller_spec.rb b/spec/controllers/projects/uploads_controller_spec.rb
index 9802e4d5b1eafc7c4a2f843699ddfc073d09ae4d..cfa67683dd31e874369966b29bd7364702d52328 100644
--- a/spec/controllers/projects/uploads_controller_spec.rb
+++ b/spec/controllers/projects/uploads_controller_spec.rb
@@ -12,7 +12,7 @@
 
   context 'when the URL the old style, without /-/system' do
     it 'responds with a redirect to the login page' do
-      get :show, namespace_id: 'project', project_id: 'avatar', filename: 'foo.png', secret: 'bar'
+      get :show, params: { namespace_id: 'project', project_id: 'avatar', filename: 'foo.png', secret: 'bar' }
 
       expect(response).to redirect_to(new_user_session_path)
     end
@@ -35,6 +35,6 @@
   def post_authorize(verified: true)
     request.headers.merge!(workhorse_internal_api_request_header) if verified
 
-    post :authorize, namespace_id: model.namespace, project_id: model.path, format: :json
+    post :authorize, params: { namespace_id: model.namespace, project_id: model.path }, format: :json
   end
 end
diff --git a/spec/controllers/projects/variables_controller_spec.rb b/spec/controllers/projects/variables_controller_spec.rb
index 9afd1f751c66a733f1723f501badd63f94a4366f..8cceda72c2859abb7f0d526101509ec2c39f9953 100644
--- a/spec/controllers/projects/variables_controller_spec.rb
+++ b/spec/controllers/projects/variables_controller_spec.rb
@@ -13,7 +13,7 @@
     let!(:variable) { create(:ci_variable, project: project) }
 
     subject do
-      get :show, namespace_id: project.namespace.to_param, project_id: project, format: :json
+      get :show, params: { namespace_id: project.namespace.to_param, project_id: project }, format: :json
     end
 
     include_examples 'GET #show lists all variables'
@@ -25,9 +25,11 @@
 
     subject do
       patch :update,
-        namespace_id: project.namespace.to_param,
-        project_id: project,
-        variables_attributes: variables_attributes,
+        params: {
+          namespace_id: project.namespace.to_param,
+          project_id: project,
+          variables_attributes: variables_attributes
+        },
         format: :json
     end
 
diff --git a/spec/controllers/projects/wikis_controller_spec.rb b/spec/controllers/projects/wikis_controller_spec.rb
index b974d927856b6b143c68fc2a7bdd04656bdae137..341bf24439761baf7dab94a576800f32a1c8e924 100644
--- a/spec/controllers/projects/wikis_controller_spec.rb
+++ b/spec/controllers/projects/wikis_controller_spec.rb
@@ -20,7 +20,7 @@
   describe 'GET #show' do
     render_views
 
-    subject { get :show, namespace_id: project.namespace, project_id: project, id: wiki_title }
+    subject { get :show, params: { namespace_id: project.namespace, project_id: project, id: wiki_title } }
 
     it 'limits the retrieved pages for the sidebar' do
       expect(controller).to receive(:load_wiki).and_return(project_wiki)
@@ -52,7 +52,7 @@
 
       let(:path) { upload_file_to_wiki(project, user, file_name) }
 
-      subject { get :show, namespace_id: project.namespace, project_id: project, id: path }
+      subject { get :show, params: { namespace_id: project.namespace, project_id: project, id: path } }
 
       context 'when file is an image' do
         let(:file_name) { 'dk.png' }
@@ -142,14 +142,14 @@
 
   describe 'POST #preview_markdown' do
     it 'renders json in a correct format' do
-      post :preview_markdown, namespace_id: project.namespace, project_id: project, id: 'page/path', text: '*Markdown* text'
+      post :preview_markdown, params: { namespace_id: project.namespace, project_id: project, id: 'page/path', text: '*Markdown* text' }
 
       expect(JSON.parse(response.body).keys).to match_array(%w(body references))
     end
   end
 
   describe 'GET #edit' do
-    subject { get(:edit, namespace_id: project.namespace, project_id: project, id: wiki_title) }
+    subject { get(:edit, params: { namespace_id: project.namespace, project_id: project, id: wiki_title }) }
 
     context 'when page content encoding is invalid' do
       it 'redirects to show' do
@@ -178,10 +178,12 @@
     let(:new_content) { 'New content' }
     subject do
       patch(:update,
-            namespace_id: project.namespace,
-            project_id: project,
-            id: wiki_title,
-            wiki: { title: new_title, content: new_content })
+            params: {
+              namespace_id: project.namespace,
+              project_id: project,
+              id: wiki_title,
+              wiki: { title: new_title, content: new_content }
+            })
     end
 
     context 'when page content encoding is invalid' do
diff --git a/spec/controllers/projects_controller_spec.rb b/spec/controllers/projects_controller_spec.rb
index 63feb99829f7b2dd605e51af05d61994477f1a5e..8611ac93fd5c2b3a082879229056643d9a16a36b 100644
--- a/spec/controllers/projects_controller_spec.rb
+++ b/spec/controllers/projects_controller_spec.rb
@@ -22,7 +22,7 @@
           it 'renders the template' do
             group.add_owner(user)
 
-            get :new, namespace_id: group.id
+            get :new, params: { namespace_id: group.id }
 
             expect(response).to have_gitlab_http_status(200)
             expect(response).to render_template('new')
@@ -31,7 +31,7 @@
 
         context 'when user does not have access to the namespace' do
           it 'responds with status 404' do
-            get :new, namespace_id: group.id
+            get :new, params: { namespace_id: group.id }
 
             expect(response).to have_gitlab_http_status(404)
             expect(response).not_to render_template('new')
@@ -71,7 +71,7 @@
         let(:private_project) { create(:project, :private) }
 
         it "does not initialize notification setting" do
-          get :show, namespace_id: private_project.namespace, id: private_project
+          get :show, params: { namespace_id: private_project.namespace, id: private_project }
           expect(assigns(:notification_setting)).to be_nil
         end
       end
@@ -79,7 +79,7 @@
       context "user has access to project" do
         context "and does not have notification setting" do
           it "initializes notification as disabled" do
-            get :show, namespace_id: public_project.namespace, id: public_project
+            get :show, params: { namespace_id: public_project.namespace, id: public_project }
             expect(assigns(:notification_setting).level).to eq("global")
           end
         end
@@ -92,7 +92,7 @@
           end
 
           it "shows current notification setting" do
-            get :show, namespace_id: public_project.namespace, id: public_project
+            get :show, params: { namespace_id: public_project.namespace, id: public_project }
             expect(assigns(:notification_setting).level).to eq("watch")
           end
         end
@@ -107,7 +107,7 @@
         end
 
         it 'shows wiki homepage' do
-          get :show, namespace_id: project.namespace, id: project
+          get :show, params: { namespace_id: project.namespace, id: project }
 
           expect(response).to render_template('projects/_wiki')
         end
@@ -116,7 +116,7 @@
           project.project_feature.update_attribute(:wiki_access_level, ProjectFeature::DISABLED)
           create(:issue, project: project)
 
-          get :show, namespace_id: project.namespace, id: project
+          get :show, params: { namespace_id: project.namespace, id: project }
 
           expect(response).to render_template('projects/issues/_issues')
           expect(assigns(:issuable_meta_data)).not_to be_nil
@@ -126,7 +126,7 @@
           project.project_feature.update_attribute(:wiki_access_level, ProjectFeature::DISABLED)
           project.project_feature.update_attribute(:issues_access_level, ProjectFeature::DISABLED)
 
-          get :show, namespace_id: project.namespace, id: project
+          get :show, params: { namespace_id: project.namespace, id: project }
 
           expect(response).to render_template("projects/_customize_workflow")
         end
@@ -134,7 +134,7 @@
         it 'shows activity if enabled by user' do
           user.update_attribute(:project_view, 'activity')
 
-          get :show, namespace_id: project.namespace, id: project
+          get :show, params: { namespace_id: project.namespace, id: project }
 
           expect(response).to render_template("projects/_activity")
         end
@@ -150,7 +150,7 @@
       end
 
       it 'renders a 503' do
-        get :show, namespace_id: project.namespace, id: project
+        get :show, params: { namespace_id: project.namespace, id: project }
 
         expect(response).to have_gitlab_http_status(503)
       end
@@ -168,7 +168,7 @@
           before do
             user.update(project_view: project_view)
 
-            get :show, namespace_id: empty_project.namespace, id: empty_project
+            get :show, params: { namespace_id: empty_project.namespace, id: empty_project }
           end
 
           it "renders the empty project view" do
@@ -190,7 +190,7 @@
           before do
             user.update(project_view: project_view)
 
-            get :show, namespace_id: empty_project.namespace, id: empty_project
+            get :show, params: { namespace_id: empty_project.namespace, id: empty_project }
           end
 
           it "renders the empty project view" do
@@ -211,7 +211,7 @@
         allow(controller).to receive(:current_user).and_return(user)
         allow(user).to receive(:project_view).and_return('activity')
 
-        get :show, namespace_id: public_project.namespace, id: public_project
+        get :show, params: { namespace_id: public_project.namespace, id: public_project }
         expect(response).to render_template('_activity')
       end
 
@@ -219,7 +219,7 @@
         allow(controller).to receive(:current_user).and_return(user)
         allow(user).to receive(:project_view).and_return('files')
 
-        get :show, namespace_id: public_project.namespace, id: public_project
+        get :show, params: { namespace_id: public_project.namespace, id: public_project }
         expect(response).to render_template('_files')
       end
 
@@ -227,7 +227,7 @@
         allow(controller).to receive(:current_user).and_return(user)
         allow(user).to receive(:project_view).and_return('readme')
 
-        get :show, namespace_id: public_project.namespace, id: public_project
+        get :show, params: { namespace_id: public_project.namespace, id: public_project }
         expect(response).to render_template('_readme')
       end
 
@@ -242,13 +242,13 @@
         it 'shows the over size limit warning message for project members' do
           allow(controller).to receive(:current_user).and_return(user)
 
-          get :show, namespace_id: public_project.namespace.path, id: public_project.path
+          get :show, params: { namespace_id: public_project.namespace.path, id: public_project.path }
 
           expect(response).to render_template('_above_size_limit_warning')
         end
 
         it 'does not show the message for non members' do
-          get :show, namespace_id: public_project.namespace.path, id: public_project.path
+          get :show, params: { namespace_id: public_project.namespace.path, id: public_project.path }
 
           expect(response).not_to render_template('_above_size_limit_warning')
         end
@@ -268,7 +268,7 @@
         project = create(:project, pending_delete: true)
         sign_in(user)
 
-        get :show, namespace_id: project.namespace, id: project
+        get :show, params: { namespace_id: project.namespace, id: project }
 
         expect(response.status).to eq 404
       end
@@ -278,7 +278,7 @@
       it 'redirects to project page (format.html)' do
         project = create(:project, :public)
 
-        get :show, namespace_id: project.namespace, id: project, format: :git
+        get :show, params: { namespace_id: project.namespace, id: project }, format: :git
 
         expect(response).to have_gitlab_http_status(302)
         expect(response).to redirect_to(namespace_project_path)
@@ -301,7 +301,7 @@
       it 'does not increase the number of queries when the project is forked' do
         expected_query = /#{public_project.fork_network.find_forks_in(other_user.namespace).to_sql}/
 
-        expect { get(:show, namespace_id: public_project.namespace, id: public_project) }
+        expect { get(:show, params: { namespace_id: public_project.namespace, id: public_project }) }
           .not_to exceed_query_limit(2).for_query(expected_query)
       end
     end
@@ -313,8 +313,10 @@
       project.add_maintainer(user)
 
       get :edit,
-          namespace_id: project.namespace.path,
-          id: project.path
+          params: {
+            namespace_id: project.namespace.path,
+            id: project.path
+          }
 
       expect(assigns(:badge_api_endpoint)).not_to be_nil
     end
@@ -378,9 +380,11 @@
         }
 
         put :update,
-            namespace_id: project.namespace,
-            id: project.id,
-            project: params
+            params: {
+              namespace_id: project.namespace,
+              id: project.id,
+              project: params
+            }
 
         expect(response).to have_gitlab_http_status(302)
         params.each do |param, value|
@@ -390,9 +394,11 @@
 
       def update_project(**parameters)
         put :update,
-            namespace_id: project.namespace.path,
-            id: project.path,
-            project: parameters
+            params: {
+              namespace_id: project.namespace.path,
+              id: project.path,
+              project: parameters
+            }
       end
     end
 
@@ -420,9 +426,11 @@ def update_project(**parameters)
       sign_in(admin)
 
       put :transfer,
-          namespace_id: project.namespace.path,
-          new_namespace_id: new_namespace.id,
-          id: project.path,
+          params: {
+            namespace_id: project.namespace.path,
+            new_namespace_id: new_namespace.id,
+            id: project.path
+          },
           format: :js
 
       project.reload
@@ -439,9 +447,11 @@ def update_project(**parameters)
         old_namespace = project.namespace
 
         put :transfer,
-            namespace_id: old_namespace.path,
-            new_namespace_id: nil,
-            id: project.path,
+            params: {
+              namespace_id: old_namespace.path,
+              new_namespace_id: nil,
+              id: project.path
+            },
             format: :js
 
         project.reload
@@ -461,7 +471,7 @@ def update_project(**parameters)
       sign_in(admin)
 
       orig_id = project.id
-      delete :destroy, namespace_id: project.namespace, id: project
+      delete :destroy, params: { namespace_id: project.namespace, id: project }
 
       expect { Project.find(orig_id) }.to raise_error(ActiveRecord::RecordNotFound)
       expect(response).to have_gitlab_http_status(302)
@@ -481,7 +491,7 @@ def update_project(**parameters)
         project.merge_requests << merge_request
         sign_in(admin)
 
-        delete :destroy, namespace_id: forked_project.namespace, id: forked_project
+        delete :destroy, params: { namespace_id: forked_project.namespace, id: forked_project }
 
         expect(merge_request.reload.state).to eq('closed')
       end
@@ -491,9 +501,11 @@ def update_project(**parameters)
   describe 'PUT #new_issuable_address for issue' do
     subject do
       put :new_issuable_address,
-        namespace_id: project.namespace,
-        id: project,
-        issuable_type: 'issue'
+        params: {
+          namespace_id: project.namespace,
+          id: project,
+          issuable_type: 'issue'
+        }
       user.reload
     end
 
@@ -519,9 +531,11 @@ def update_project(**parameters)
   describe 'PUT #new_issuable_address for merge request' do
     subject do
       put :new_issuable_address,
-        namespace_id: project.namespace,
-        id: project,
-        issuable_type: 'merge_request'
+        params: {
+          namespace_id: project.namespace,
+          id: project,
+          issuable_type: 'merge_request'
+        }
       user.reload
     end
 
@@ -549,23 +563,31 @@ def update_project(**parameters)
       sign_in(user)
       expect(user.starred?(public_project)).to be_falsey
       post(:toggle_star,
-           namespace_id: public_project.namespace,
-           id: public_project)
+           params: {
+             namespace_id: public_project.namespace,
+             id: public_project
+           })
       expect(user.starred?(public_project)).to be_truthy
       post(:toggle_star,
-           namespace_id: public_project.namespace,
-           id: public_project)
+           params: {
+             namespace_id: public_project.namespace,
+             id: public_project
+           })
       expect(user.starred?(public_project)).to be_falsey
     end
 
     it "does nothing if user is not signed in" do
       post(:toggle_star,
-           namespace_id: project.namespace,
-           id: public_project)
+           params: {
+             namespace_id: project.namespace,
+             id: public_project
+           })
       expect(user.starred?(public_project)).to be_falsey
       post(:toggle_star,
-           namespace_id: project.namespace,
-           id: public_project)
+           params: {
+             namespace_id: project.namespace,
+             id: public_project
+           })
       expect(user.starred?(public_project)).to be_falsey
     end
   end
@@ -581,8 +603,11 @@ def update_project(**parameters)
 
         it 'removes fork from project' do
           delete(:remove_fork,
-              namespace_id: forked_project.namespace.to_param,
-              id: forked_project.to_param, format: :js)
+              params: {
+                namespace_id: forked_project.namespace.to_param,
+                id: forked_project.to_param
+              },
+              format: :js)
 
           expect(forked_project.reload.forked?).to be_falsey
           expect(flash[:notice]).to eq('The fork relationship has been removed.')
@@ -595,8 +620,11 @@ def update_project(**parameters)
 
         it 'does nothing if project was not forked' do
           delete(:remove_fork,
-              namespace_id: unforked_project.namespace,
-              id: unforked_project, format: :js)
+              params: {
+                namespace_id: unforked_project.namespace,
+                id: unforked_project
+              },
+              format: :js)
 
           expect(flash[:notice]).to be_nil
           expect(response).to render_template(:remove_fork)
@@ -606,8 +634,11 @@ def update_project(**parameters)
 
     it "does nothing if user is not signed in" do
       delete(:remove_fork,
-          namespace_id: project.namespace,
-          id: project, format: :js)
+          params: {
+            namespace_id: project.namespace,
+            id: project
+          },
+          format: :js)
       expect(response).to have_gitlab_http_status(401)
     end
   end
@@ -616,7 +647,7 @@ def update_project(**parameters)
     let(:public_project) { create(:project, :public, :repository) }
 
     it 'gets a list of branches and tags' do
-      get :refs, namespace_id: public_project.namespace, id: public_project, sort: 'updated_desc'
+      get :refs, params: { namespace_id: public_project.namespace, id: public_project, sort: 'updated_desc' }
 
       parsed_body = JSON.parse(response.body)
       expect(parsed_body['Branches']).to include('master')
@@ -626,7 +657,7 @@ def update_project(**parameters)
     end
 
     it "gets a list of branches, tags and commits" do
-      get :refs, namespace_id: public_project.namespace, id: public_project, ref: "123456"
+      get :refs, params: { namespace_id: public_project.namespace, id: public_project, ref: "123456" }
 
       parsed_body = JSON.parse(response.body)
       expect(parsed_body["Branches"]).to include("master")
@@ -641,7 +672,7 @@ def update_project(**parameters)
       end
 
       it "gets a list of branches, tags and commits" do
-        get :refs, namespace_id: public_project.namespace, id: public_project, ref: "123456"
+        get :refs, params: { namespace_id: public_project.namespace, id: public_project, ref: "123456" }
 
         parsed_body = JSON.parse(response.body)
         expect(parsed_body["Branches"]).to include("master")
@@ -656,8 +687,10 @@ def update_project(**parameters)
       sign_in(create(:user, :auditor))
 
       get :edit,
-          namespace_id: project.namespace.path,
-          id: project.path
+          params: {
+            namespace_id: project.namespace.path,
+            id: project.path
+          }
 
       expect(response).to have_gitlab_http_status(404)
     end
@@ -666,8 +699,10 @@ def update_project(**parameters)
       sign_in(create(:user, :admin))
 
       get :edit,
-          namespace_id: project.namespace.path,
-          id: project.path
+          params: {
+            namespace_id: project.namespace.path,
+            id: project.path
+          }
 
       expect(response).to have_gitlab_http_status(200)
     end
@@ -679,7 +714,7 @@ def update_project(**parameters)
     end
 
     it 'renders json in a correct format' do
-      post :preview_markdown, namespace_id: public_project.namespace, id: public_project, text: '*Markdown* text'
+      post :preview_markdown, params: { namespace_id: public_project.namespace, id: public_project, text: '*Markdown* text' }
 
       expect(JSON.parse(response.body).keys).to match_array(%w(body references))
     end
@@ -689,9 +724,11 @@ def update_project(**parameters)
       let(:merge_request) { create(:merge_request, :closed, target_project: public_project) }
 
       it 'renders JSON body with state filter for issues' do
-        post :preview_markdown, namespace_id: public_project.namespace,
-                                id: public_project,
-                                text: issue.to_reference
+        post :preview_markdown, params: {
+                                  namespace_id: public_project.namespace,
+                                  id: public_project,
+                                  text: issue.to_reference
+                                }
 
         json_response = JSON.parse(response.body)
 
@@ -699,9 +736,11 @@ def update_project(**parameters)
       end
 
       it 'renders JSON body with state filter for MRs' do
-        post :preview_markdown, namespace_id: public_project.namespace,
-                                id: public_project,
-                                text: merge_request.to_reference
+        post :preview_markdown, params: {
+                                  namespace_id: public_project.namespace,
+                                  id: public_project,
+                                  text: merge_request.to_reference
+                                }
 
         json_response = JSON.parse(response.body)
 
@@ -719,7 +758,7 @@ def update_project(**parameters)
       context 'when requesting the canonical path' do
         context "with exactly matching casing" do
           it "loads the project" do
-            get :show, namespace_id: public_project.namespace, id: public_project
+            get :show, params: { namespace_id: public_project.namespace, id: public_project }
 
             expect(assigns(:project)).to eq(public_project)
             expect(response).to have_gitlab_http_status(200)
@@ -728,7 +767,7 @@ def update_project(**parameters)
 
         context "with different casing" do
           it "redirects to the normalized path" do
-            get :show, namespace_id: public_project.namespace, id: public_project.path.upcase
+            get :show, params: { namespace_id: public_project.namespace, id: public_project.path.upcase }
 
             expect(assigns(:project)).to eq(public_project)
             expect(response).to redirect_to("/#{public_project.full_path}")
@@ -741,14 +780,14 @@ def update_project(**parameters)
         let!(:redirect_route) { public_project.redirect_routes.create!(path: "foo/bar") }
 
         it 'redirects to the canonical path' do
-          get :show, namespace_id: 'foo', id: 'bar'
+          get :show, params: { namespace_id: 'foo', id: 'bar' }
 
           expect(response).to redirect_to(public_project)
           expect(controller).to set_flash[:notice].to(project_moved_message(redirect_route, public_project))
         end
 
         it 'redirects to the canonical path (testing non-show action)' do
-          get :refs, namespace_id: 'foo', id: 'bar'
+          get :refs, params: { namespace_id: 'foo', id: 'bar' }
 
           expect(response).to redirect_to(refs_project_path(public_project))
           expect(controller).to set_flash[:notice].to(project_moved_message(redirect_route, public_project))
@@ -759,13 +798,13 @@ def update_project(**parameters)
     context 'for a POST request' do
       context 'when requesting the canonical path with different casing' do
         it 'does not 404' do
-          post :toggle_star, namespace_id: public_project.namespace, id: public_project.path.upcase
+          post :toggle_star, params: { namespace_id: public_project.namespace, id: public_project.path.upcase }
 
           expect(response).not_to have_gitlab_http_status(404)
         end
 
         it 'does not redirect to the correct casing' do
-          post :toggle_star, namespace_id: public_project.namespace, id: public_project.path.upcase
+          post :toggle_star, params: { namespace_id: public_project.namespace, id: public_project.path.upcase }
 
           expect(response).not_to have_gitlab_http_status(301)
         end
@@ -775,7 +814,7 @@ def update_project(**parameters)
         let!(:redirect_route) { public_project.redirect_routes.create!(path: "foo/bar") }
 
         it 'returns not found' do
-          post :toggle_star, namespace_id: 'foo', id: 'bar'
+          post :toggle_star, params: { namespace_id: 'foo', id: 'bar' }
 
           expect(response).to have_gitlab_http_status(404)
         end
@@ -789,13 +828,13 @@ def update_project(**parameters)
 
       context 'when requesting the canonical path with different casing' do
         it 'does not 404' do
-          delete :destroy, namespace_id: project.namespace, id: project.path.upcase
+          delete :destroy, params: { namespace_id: project.namespace, id: project.path.upcase }
 
           expect(response).not_to have_gitlab_http_status(404)
         end
 
         it 'does not redirect to the correct casing' do
-          delete :destroy, namespace_id: project.namespace, id: project.path.upcase
+          delete :destroy, params: { namespace_id: project.namespace, id: project.path.upcase }
 
           expect(response).not_to have_gitlab_http_status(301)
         end
@@ -805,7 +844,7 @@ def update_project(**parameters)
         let!(:redirect_route) { project.redirect_routes.create!(path: "foo/bar") }
 
         it 'returns not found' do
-          delete :destroy, namespace_id: 'foo', id: 'bar'
+          delete :destroy, params: { namespace_id: 'foo', id: 'bar' }
 
           expect(response).to have_gitlab_http_status(404)
         end
@@ -822,7 +861,7 @@ def update_project(**parameters)
 
     context 'when project export is enabled' do
       it 'returns 302' do
-        get :export, namespace_id: project.namespace, id: project
+        get :export, params: { namespace_id: project.namespace, id: project }
 
         expect(response).to have_gitlab_http_status(302)
       end
@@ -834,7 +873,7 @@ def update_project(**parameters)
       end
 
       it 'returns 404' do
-        get :export, namespace_id: project.namespace, id: project
+        get :export, params: { namespace_id: project.namespace, id: project }
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -851,7 +890,7 @@ def update_project(**parameters)
     context 'object storage enabled' do
       context 'when project export is enabled' do
         it 'returns 302' do
-          get :download_export, namespace_id: project.namespace, id: project
+          get :download_export, params: { namespace_id: project.namespace, id: project }
 
           expect(response).to have_gitlab_http_status(302)
         end
@@ -863,7 +902,7 @@ def update_project(**parameters)
         end
 
         it 'returns 404' do
-          get :download_export, namespace_id: project.namespace, id: project
+          get :download_export, params: { namespace_id: project.namespace, id: project }
 
           expect(response).to have_gitlab_http_status(404)
         end
@@ -880,7 +919,7 @@ def update_project(**parameters)
 
     context 'when project export is enabled' do
       it 'returns 302' do
-        post :remove_export, namespace_id: project.namespace, id: project
+        post :remove_export, params: { namespace_id: project.namespace, id: project }
 
         expect(response).to have_gitlab_http_status(302)
       end
@@ -892,7 +931,7 @@ def update_project(**parameters)
       end
 
       it 'returns 404' do
-        post :remove_export, namespace_id: project.namespace, id: project
+        post :remove_export, params: { namespace_id: project.namespace, id: project }
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -908,7 +947,7 @@ def update_project(**parameters)
 
     context 'when project export is enabled' do
       it 'returns 302' do
-        post :generate_new_export, namespace_id: project.namespace, id: project
+        post :generate_new_export, params: { namespace_id: project.namespace, id: project }
 
         expect(response).to have_gitlab_http_status(302)
       end
@@ -920,7 +959,7 @@ def update_project(**parameters)
       end
 
       it 'returns 404' do
-        post :generate_new_export, namespace_id: project.namespace, id: project
+        post :generate_new_export, params: { namespace_id: project.namespace, id: project }
 
         expect(response).to have_gitlab_http_status(404)
       end
diff --git a/spec/controllers/registrations_controller_spec.rb b/spec/controllers/registrations_controller_spec.rb
index d334a2ff5663860b098c70f593cbbcaed17fe6e4..fd151e8a29885fd03e520a5f20a7a6775dce759e 100644
--- a/spec/controllers/registrations_controller_spec.rb
+++ b/spec/controllers/registrations_controller_spec.rb
@@ -17,7 +17,7 @@
         it 'signs the user in' do
           allow_any_instance_of(ApplicationSetting).to receive(:send_user_confirmation_email).and_return(false)
 
-          expect { post(:create, user_params) }.not_to change { ActionMailer::Base.deliveries.size }
+          expect { post(:create, params: user_params) }.not_to change { ActionMailer::Base.deliveries.size }
           expect(subject.current_user).not_to be_nil
         end
       end
@@ -26,7 +26,7 @@
         it 'does not authenticate user and sends confirmation email' do
           allow_any_instance_of(ApplicationSetting).to receive(:send_user_confirmation_email).and_return(true)
 
-          post(:create, user_params)
+          post(:create, params: user_params)
 
           expect(ActionMailer::Base.deliveries.last.to.first).to eq(user_params[:user][:email])
           expect(subject.current_user).to be_nil
@@ -37,7 +37,7 @@
         it 'redirects to sign_in' do
           allow_any_instance_of(ApplicationSetting).to receive(:signup_enabled?).and_return(false)
 
-          expect { post(:create, user_params) }.not_to change(User, :count)
+          expect { post(:create, params: user_params) }.not_to change(User, :count)
           expect(response).to redirect_to(new_user_session_path)
         end
       end
@@ -52,7 +52,7 @@
         # Without this, `verify_recaptcha` arbitrarily returns true in test env
         Recaptcha.configuration.skip_verify_env.delete('test')
 
-        post(:create, user_params)
+        post(:create, params: user_params)
 
         expect(response).to render_template(:new)
         expect(flash[:alert]).to include 'There was an error with the reCAPTCHA. Please solve the reCAPTCHA again.'
@@ -64,7 +64,7 @@
           Recaptcha.configuration.skip_verify_env << 'test'
         end
 
-        post(:create, user_params)
+        post(:create, params: user_params)
 
         expect(flash[:notice]).to include 'Welcome! You have signed up successfully.'
       end
@@ -76,13 +76,13 @@
       end
 
       it 'redirects back with a notice when the checkbox was not checked' do
-        post :create, user_params
+        post :create, params: user_params
 
         expect(flash[:alert]).to match /you must accept our terms/i
       end
 
       it 'creates the user with agreement when terms are accepted' do
-        post :create, user_params.merge(terms_opt_in: '1')
+        post :create, params: user_params.merge(terms_opt_in: '1')
 
         expect(subject.current_user).to be_present
         expect(subject.current_user.terms_accepted?).to be(true)
@@ -125,13 +125,13 @@ def expect_success
       end
 
       it 'fails if password confirmation is wrong' do
-        post :destroy, password: 'wrong password'
+        post :destroy, params: { password: 'wrong password' }
 
         expect_password_failure
       end
 
       it 'succeeds if password is confirmed' do
-        post :destroy, password: '12345678'
+        post :destroy, params: { password: '12345678' }
 
         expect_success
       end
@@ -150,13 +150,13 @@ def expect_success
       end
 
       it 'fails if username confirmation is wrong' do
-        post :destroy, username: 'wrong username'
+        post :destroy, params: { username: 'wrong username' }
 
         expect_username_failure
       end
 
       it 'succeeds if username is confirmed' do
-        post :destroy, username: user.username
+        post :destroy, params: { username: user.username }
 
         expect_success
       end
diff --git a/spec/controllers/search_controller_spec.rb b/spec/controllers/search_controller_spec.rb
index 416a09e168420b2aa2b5a4a494027e884c7195ea..c9b53336fd1f9933914a8002f7690950449b3069 100644
--- a/spec/controllers/search_controller_spec.rb
+++ b/spec/controllers/search_controller_spec.rb
@@ -11,7 +11,7 @@
     project = create(:project, :public)
     note = create(:note_on_issue, project: project)
 
-    get :show, project_id: project.id, scope: 'notes', search: note.note
+    get :show, params: { project_id: project.id, scope: 'notes', search: note.note }
 
     expect(assigns[:search_objects].first).to eq note
   end
@@ -30,13 +30,13 @@
     end
 
     it 'still blocks searches without a project_id' do
-      get :show, search: 'hello'
+      get :show, params: { search: 'hello' }
 
       expect(response).to have_gitlab_http_status(403)
     end
 
     it 'allows searches with a project_id' do
-      get :show, search: 'hello', project_id: create(:project, :public).id
+      get :show, params: { search: 'hello', project_id: create(:project, :public).id }
 
       expect(response).to have_gitlab_http_status(200)
     end
@@ -52,7 +52,7 @@
         project = create(:project, :public, :issues_private)
         note = create(:note_on_issue, project: project)
 
-        get :show, project_id: project.id, scope: 'notes', search: note.note
+        get :show, params: { project_id: project.id, scope: 'notes', search: note.note }
 
         expect(assigns[:search_objects].count).to eq(0)
       end
@@ -62,7 +62,7 @@
       project = create(:project, :public, :merge_requests_private)
       note = create(:note_on_merge_request, project: project)
 
-      get :show, project_id: project.id, scope: 'notes', search: note.note
+      get :show, params: { project_id: project.id, scope: 'notes', search: note.note }
 
       expect(assigns[:search_objects].count).to eq(0)
     end
@@ -71,7 +71,7 @@
       project = create(:project, :public, :snippets_private)
       note = create(:note_on_project_snippet, project: project)
 
-      get :show, project_id: project.id, scope: 'notes', search: note.note
+      get :show, params: { project_id: project.id, scope: 'notes', search: note.note }
 
       expect(assigns[:search_objects].count).to eq(0)
     end
diff --git a/spec/controllers/sent_notifications_controller_spec.rb b/spec/controllers/sent_notifications_controller_spec.rb
index 54a9af92f072278e9d0cd3f15991a8357289b1b2..75c91dd8607f0a1f1216bf0758b6368fc7745782 100644
--- a/spec/controllers/sent_notifications_controller_spec.rb
+++ b/spec/controllers/sent_notifications_controller_spec.rb
@@ -15,7 +15,7 @@
     context 'when the user is not logged in' do
       context 'when the force param is passed' do
         before do
-          get(:unsubscribe, id: sent_notification.reply_key, force: true)
+          get(:unsubscribe, params: { id: sent_notification.reply_key, force: true })
         end
 
         it 'unsubscribes the user' do
@@ -33,7 +33,7 @@
 
       context 'when the force param is not passed' do
         before do
-          get(:unsubscribe, id: sent_notification.reply_key)
+          get(:unsubscribe, params: { id: sent_notification.reply_key })
         end
 
         it 'does not unsubscribe the user' do
@@ -57,7 +57,7 @@
 
       context 'when the ID passed does not exist' do
         before do
-          get(:unsubscribe, id: sent_notification.reply_key.reverse)
+          get(:unsubscribe, params: { id: sent_notification.reply_key.reverse })
         end
 
         it 'does not unsubscribe the user' do
@@ -75,7 +75,7 @@
 
       context 'when the force param is passed' do
         before do
-          get(:unsubscribe, id: sent_notification.reply_key, force: true)
+          get(:unsubscribe, params: { id: sent_notification.reply_key, force: true })
         end
 
         it 'unsubscribes the user' do
@@ -101,7 +101,7 @@
         let(:sent_notification) { create(:sent_notification, project: project, noteable: merge_request, recipient: user) }
 
         before do
-          get(:unsubscribe, id: sent_notification.reply_key)
+          get(:unsubscribe, params: { id: sent_notification.reply_key })
         end
 
         it 'unsubscribes the user' do
diff --git a/spec/controllers/sessions_controller_spec.rb b/spec/controllers/sessions_controller_spec.rb
index c691b3f478bf77ee5638dc98408b4ea748fcda26..ea7242c1aa8e7992e14ff8afa3e475888daeee83 100644
--- a/spec/controllers/sessions_controller_spec.rb
+++ b/spec/controllers/sessions_controller_spec.rb
@@ -26,7 +26,7 @@
 
       context 'and auto_sign_in=false param is passed' do
         it 'responds with 200' do
-          get(:new, auto_sign_in: 'false')
+          get(:new, params: { auto_sign_in: 'false' })
 
           expect(response).to have_gitlab_http_status(200)
         end
@@ -42,7 +42,7 @@
     context 'when using standard authentications' do
       context 'invalid password' do
         it 'does not authenticate user' do
-          post(:create, user: { login: 'invalid', password: 'invalid' })
+          post(:create, params: { user: { login: 'invalid', password: 'invalid' } })
 
           expect(response)
             .to set_flash.now[:alert].to /Invalid Login or password/
@@ -54,19 +54,19 @@
         let(:user_params) { { login: user.username, password: user.password } }
 
         it 'authenticates user correctly' do
-          post(:create, user: user_params)
+          post(:create, params: { user: user_params })
 
           expect(subject.current_user). to eq user
         end
 
         it 'creates an audit log record' do
-          expect { post(:create, user: user_params) }.to change { SecurityEvent.count }.by(1)
+          expect { post(:create, params: { user: user_params }) }.to change { SecurityEvent.count }.by(1)
           expect(SecurityEvent.last.details[:with]).to eq('standard')
         end
 
         include_examples 'user login request with unique ip limit', 302 do
           def request
-            post(:create, user: user_params)
+            post(:create, params: { user: user_params })
             expect(subject.current_user).to eq user
             subject.sign_out user
           end
@@ -74,7 +74,7 @@ def request
 
         it 'updates the user activity' do
           expect do
-            post(:create, user: user_params)
+            post(:create, params: { user: user_params })
           end.to change { user.reload.last_activity_on }.to(Date.today)
         end
       end
@@ -98,7 +98,7 @@ def request
                                       .with(:failed_login_captcha_total, anything)
                                       .and_return(counter)
 
-          post(:create, user: user_params)
+          post(:create, params: { user: user_params })
 
           expect(response).to render_template(:new)
           expect(flash[:alert]).to include 'There was an error with the reCAPTCHA. Please solve the reCAPTCHA again.'
@@ -116,7 +116,7 @@ def request
                                       .and_return(counter)
           expect(Gitlab::Metrics).to receive(:counter).and_call_original
 
-          post(:create, user: user_params)
+          post(:create, params: { user: user_params })
 
           expect(subject.current_user).to eq user
         end
@@ -127,7 +127,7 @@ def request
       let(:user) { create(:user, :two_factor) }
 
       def authenticate_2fa(user_params)
-        post(:create, { user: user_params }, { otp_user_id: user.id })
+        post(:create, params: { user: user_params }, session: { otp_user_id: user.id })
       end
 
       context 'remember_me field' do
@@ -233,7 +233,7 @@ def authenticate_2fa(user_params)
               end
 
               it 'keeps the user locked on future login attempts' do
-                post(:create, user: { login: user.username, password: user.password })
+                post(:create, params: { user: { login: user.username, password: user.password } })
 
                 expect(response)
                   .to set_flash.now[:alert].to /Invalid Login or password/
@@ -265,7 +265,7 @@ def authenticate_2fa(user_params)
       let(:user) { create(:user, :two_factor) }
 
       def authenticate_2fa_u2f(user_params)
-        post(:create, { user: user_params }, { otp_user_id: user.id })
+        post(:create, params: { user: user_params }, session: { otp_user_id: user.id })
       end
 
       context 'remember_me field' do
@@ -309,7 +309,7 @@ def authenticate_2fa_u2f(user_params)
       search_path = "/search?search=seed_project"
       request.headers[:HTTP_REFERER] = "http://#{host}#{search_path}"
 
-      get(:new, redirect_to_referer: :yes)
+      get(:new, params: { redirect_to_referer: :yes })
 
       expect(controller.stored_location_for(:redirect)).to eq(search_path)
     end
diff --git a/spec/controllers/snippets/notes_controller_spec.rb b/spec/controllers/snippets/notes_controller_spec.rb
index e6148ea173457ce497610fd0603ce2c668679e37..6efbd1f6c71e19bc5d0f072c348dcdad22ffec08 100644
--- a/spec/controllers/snippets/notes_controller_spec.rb
+++ b/spec/controllers/snippets/notes_controller_spec.rb
@@ -16,7 +16,7 @@
       before do
         note_on_public
 
-        get :index, { snippet_id: public_snippet }
+        get :index, params: { snippet_id: public_snippet }
       end
 
       it "returns status 200" do
@@ -35,7 +35,7 @@
 
       context 'when user not logged in' do
         it "returns status 404" do
-          get :index, { snippet_id: internal_snippet }
+          get :index, params: { snippet_id: internal_snippet }
 
           expect(response).to have_gitlab_http_status(404)
         end
@@ -47,7 +47,7 @@
         end
 
         it "returns status 200" do
-          get :index, { snippet_id: internal_snippet }
+          get :index, params: { snippet_id: internal_snippet }
 
           expect(response).to have_gitlab_http_status(200)
         end
@@ -61,7 +61,7 @@
 
       context 'when user not logged in' do
         it "returns status 404" do
-          get :index, { snippet_id: private_snippet }
+          get :index, params: { snippet_id: private_snippet }
 
           expect(response).to have_gitlab_http_status(404)
         end
@@ -73,7 +73,7 @@
         end
 
         it "returns status 404" do
-          get :index, { snippet_id: private_snippet }
+          get :index, params: { snippet_id: private_snippet }
 
           expect(response).to have_gitlab_http_status(404)
         end
@@ -87,13 +87,13 @@
         end
 
         it "returns status 200" do
-          get :index, { snippet_id: private_snippet }
+          get :index, params: { snippet_id: private_snippet }
 
           expect(response).to have_gitlab_http_status(200)
         end
 
         it "returns 1 note" do
-          get :index, { snippet_id: private_snippet }
+          get :index, params: { snippet_id: private_snippet }
 
           expect(JSON.parse(response.body)['notes'].count).to eq(1)
         end
@@ -110,7 +110,7 @@
       end
 
       it "does not return any note" do
-        get :index, { snippet_id: public_snippet }
+        get :index, params: { snippet_id: public_snippet }
 
         expect(JSON.parse(response.body)['notes'].count).to eq(0)
       end
@@ -132,13 +132,13 @@
       end
 
       it "returns status 200" do
-        delete :destroy, request_params
+        delete :destroy, params: request_params
 
         expect(response).to have_gitlab_http_status(200)
       end
 
       it "deletes the note" do
-        expect { delete :destroy, request_params }.to change { Note.count }.from(1).to(0)
+        expect { delete :destroy, params: request_params }.to change { Note.count }.from(1).to(0)
       end
 
       context 'system note' do
@@ -147,7 +147,7 @@
         end
 
         it "does not delete the note" do
-          expect { delete :destroy, request_params }.not_to change { Note.count }
+          expect { delete :destroy, params: request_params }.not_to change { Note.count }
         end
       end
     end
@@ -160,13 +160,13 @@
       end
 
       it "returns status 404" do
-        delete :destroy, request_params
+        delete :destroy, params: request_params
 
         expect(response).to have_gitlab_http_status(404)
       end
 
       it "does not update the note" do
-        expect { delete :destroy, request_params }.not_to change { Note.count }
+        expect { delete :destroy, params: request_params }.not_to change { Note.count }
       end
     end
   end
@@ -177,7 +177,7 @@
       sign_in(user)
     end
 
-    subject { post(:toggle_award_emoji, snippet_id: public_snippet, id: note.id, name: "thumbsup") }
+    subject { post(:toggle_award_emoji, params: { snippet_id: public_snippet, id: note.id, name: "thumbsup" }) }
 
     it "toggles the award emoji" do
       expect { subject }.to change { note.award_emoji.count }.by(1)
diff --git a/spec/controllers/snippets_controller_spec.rb b/spec/controllers/snippets_controller_spec.rb
index 957bab638b1db5723574e14f1f8e21e8c6b12094..01a5161f7756b4da293a344e1926071f2c997b60 100644
--- a/spec/controllers/snippets_controller_spec.rb
+++ b/spec/controllers/snippets_controller_spec.rb
@@ -8,7 +8,7 @@
 
     context 'when username parameter is present' do
       it 'renders snippets of a user when username is present' do
-        get :index, username: user.username
+        get :index, params: { username: user.username }
 
         expect(response).to render_template(:index)
       end
@@ -67,7 +67,7 @@
           let(:other_personal_snippet) { create(:personal_snippet, :private, author: other_author) }
 
           it 'responds with status 404' do
-            get :show, id: other_personal_snippet.to_param
+            get :show, params: { id: other_personal_snippet.to_param }
 
             expect(response).to have_gitlab_http_status(404)
           end
@@ -75,7 +75,7 @@
 
         context 'when signed in user is the author' do
           it 'renders the snippet' do
-            get :show, id: personal_snippet.to_param
+            get :show, params: { id: personal_snippet.to_param }
 
             expect(assigns(:snippet)).to eq(personal_snippet)
             expect(response).to have_gitlab_http_status(200)
@@ -85,7 +85,7 @@
 
       context 'when not signed in' do
         it 'redirects to the sign in page' do
-          get :show, id: personal_snippet.to_param
+          get :show, params: { id: personal_snippet.to_param }
 
           expect(response).to redirect_to(new_user_session_path)
         end
@@ -101,7 +101,7 @@
         end
 
         it 'renders the snippet' do
-          get :show, id: personal_snippet.to_param
+          get :show, params: { id: personal_snippet.to_param }
 
           expect(assigns(:snippet)).to eq(personal_snippet)
           expect(response).to have_gitlab_http_status(200)
@@ -110,7 +110,7 @@
 
       context 'when not signed in' do
         it 'redirects to the sign in page' do
-          get :show, id: personal_snippet.to_param
+          get :show, params: { id: personal_snippet.to_param }
 
           expect(response).to redirect_to(new_user_session_path)
         end
@@ -126,7 +126,7 @@
         end
 
         it 'renders the snippet' do
-          get :show, id: personal_snippet.to_param
+          get :show, params: { id: personal_snippet.to_param }
 
           expect(assigns(:snippet)).to eq(personal_snippet)
           expect(response).to have_gitlab_http_status(200)
@@ -135,7 +135,7 @@
 
       context 'when not signed in' do
         it 'renders the snippet' do
-          get :show, id: personal_snippet.to_param
+          get :show, params: { id: personal_snippet.to_param }
 
           expect(assigns(:snippet)).to eq(personal_snippet)
           expect(response).to have_gitlab_http_status(200)
@@ -150,7 +150,7 @@
         end
 
         it 'responds with status 404' do
-          get :show, id: 'doesntexist'
+          get :show, params: { id: 'doesntexist' }
 
           expect(response).to have_gitlab_http_status(404)
         end
@@ -158,7 +158,7 @@
 
       context 'when not signed in' do
         it 'responds with status 404' do
-          get :show, id: 'doesntexist'
+          get :show, params: { id: 'doesntexist' }
 
           expect(response).to redirect_to(new_user_session_path)
         end
@@ -170,7 +170,7 @@
     def create_snippet(snippet_params = {}, additional_params = {})
       sign_in(user)
 
-      post :create, {
+      post :create, params: {
         personal_snippet: { title: 'Title', content: 'Content', description: 'Description' }.merge(snippet_params)
       }.merge(additional_params)
 
@@ -279,7 +279,7 @@ def create_snippet(snippet_params = {}, additional_params = {})
     def update_snippet(snippet_params = {}, additional_params = {})
       sign_in(user)
 
-      put :update, {
+      put :update, params: {
         id: snippet.id,
         personal_snippet: { title: 'Title', content: 'Content' }.merge(snippet_params)
       }.merge(additional_params)
@@ -406,7 +406,7 @@ def mark_as_spam
       create(:user_agent_detail, subject: snippet)
       sign_in(admin)
 
-      post :mark_as_spam, id: snippet.id
+      post :mark_as_spam, params: { id: snippet.id }
     end
 
     it 'updates the snippet' do
@@ -430,7 +430,7 @@ def mark_as_spam
           let(:other_personal_snippet) { create(:personal_snippet, :private, author: other_author) }
 
           it 'responds with status 404' do
-            get :raw, id: other_personal_snippet.to_param
+            get :raw, params: { id: other_personal_snippet.to_param }
 
             expect(response).to have_gitlab_http_status(404)
           end
@@ -441,7 +441,7 @@ def mark_as_spam
 
           before do
             stub_feature_flags(workhorse_set_content_type: flag_value)
-            get :raw, id: personal_snippet.to_param
+            get :raw, params: { id: personal_snippet.to_param }
           end
 
           it 'responds with status 200' do
@@ -477,7 +477,7 @@ def mark_as_spam
 
       context 'when not signed in' do
         it 'redirects to the sign in page' do
-          get :raw, id: personal_snippet.to_param
+          get :raw, params: { id: personal_snippet.to_param }
 
           expect(response).to redirect_to(new_user_session_path)
         end
@@ -493,7 +493,7 @@ def mark_as_spam
         end
 
         it 'responds with status 200' do
-          get :raw, id: personal_snippet.to_param
+          get :raw, params: { id: personal_snippet.to_param }
 
           expect(assigns(:snippet)).to eq(personal_snippet)
           expect(response).to have_gitlab_http_status(200)
@@ -502,7 +502,7 @@ def mark_as_spam
 
       context 'when not signed in' do
         it 'redirects to the sign in page' do
-          get :raw, id: personal_snippet.to_param
+          get :raw, params: { id: personal_snippet.to_param }
 
           expect(response).to redirect_to(new_user_session_path)
         end
@@ -518,7 +518,7 @@ def mark_as_spam
         end
 
         it 'responds with status 200' do
-          get :raw, id: personal_snippet.to_param
+          get :raw, params: { id: personal_snippet.to_param }
 
           expect(assigns(:snippet)).to eq(personal_snippet)
           expect(response).to have_gitlab_http_status(200)
@@ -530,13 +530,13 @@ def mark_as_spam
           end
 
           it 'returns LF line endings by default' do
-            get :raw, id: personal_snippet.to_param
+            get :raw, params: { id: personal_snippet.to_param }
 
             expect(response.body).to eq("first line\nsecond line\nthird line")
           end
 
           it 'does not convert line endings when parameter present' do
-            get :raw, id: personal_snippet.to_param, line_ending: :raw
+            get :raw, params: { id: personal_snippet.to_param, line_ending: :raw }
 
             expect(response.body).to eq("first line\r\nsecond line\r\nthird line")
           end
@@ -545,7 +545,7 @@ def mark_as_spam
 
       context 'when not signed in' do
         it 'responds with status 200' do
-          get :raw, id: personal_snippet.to_param
+          get :raw, params: { id: personal_snippet.to_param }
 
           expect(assigns(:snippet)).to eq(personal_snippet)
           expect(response).to have_gitlab_http_status(200)
@@ -560,7 +560,7 @@ def mark_as_spam
         end
 
         it 'responds with status 404' do
-          get :raw, id: 'doesntexist'
+          get :raw, params: { id: 'doesntexist' }
 
           expect(response).to have_gitlab_http_status(404)
         end
@@ -568,7 +568,7 @@ def mark_as_spam
 
       context 'when not signed in' do
         it 'redirects to the sign in path' do
-          get :raw, id: 'doesntexist'
+          get :raw, params: { id: 'doesntexist' }
 
           expect(response).to redirect_to(new_user_session_path)
         end
@@ -587,17 +587,17 @@ def mark_as_spam
     describe 'POST #toggle_award_emoji' do
       it "toggles the award emoji" do
         expect do
-          post(:toggle_award_emoji, id: personal_snippet.to_param, name: "thumbsup")
+          post(:toggle_award_emoji, params: { id: personal_snippet.to_param, name: "thumbsup" })
         end.to change { personal_snippet.award_emoji.count }.from(0).to(1)
 
         expect(response.status).to eq(200)
       end
 
       it "removes the already awarded emoji" do
-        post(:toggle_award_emoji, id: personal_snippet.to_param, name: "thumbsup")
+        post(:toggle_award_emoji, params: { id: personal_snippet.to_param, name: "thumbsup" })
 
         expect do
-          post(:toggle_award_emoji, id: personal_snippet.to_param, name: "thumbsup")
+          post(:toggle_award_emoji, params: { id: personal_snippet.to_param, name: "thumbsup" })
         end.to change { personal_snippet.award_emoji.count }.from(1).to(0)
 
         expect(response.status).to eq(200)
@@ -611,7 +611,7 @@ def mark_as_spam
     it 'renders json in a correct format' do
       sign_in(user)
 
-      post :preview_markdown, id: snippet, text: '*Markdown* text'
+      post :preview_markdown, params: { id: snippet, text: '*Markdown* text' }
 
       expect(JSON.parse(response.body).keys).to match_array(%w(body references))
     end
diff --git a/spec/controllers/uploads_controller_spec.rb b/spec/controllers/uploads_controller_spec.rb
index 832649e5886bcdf00e427f93b9f0278d8b26cc6a..19142aa127246a53c521f52f5da7154a548df56e 100644
--- a/spec/controllers/uploads_controller_spec.rb
+++ b/spec/controllers/uploads_controller_spec.rb
@@ -23,7 +23,7 @@
 
     context 'when a user does not have permissions to upload a file' do
       it "returns 401 when the user is not logged in" do
-        post :create, model: model, id: snippet.id, format: :json
+        post :create, params: { model: model, id: snippet.id }, format: :json
 
         expect(response).to have_gitlab_http_status(401)
       end
@@ -32,7 +32,7 @@
         private_snippet = create(:personal_snippet, :private)
 
         sign_in(user)
-        post :create, model: model, id: private_snippet.id, format: :json
+        post :create, params: { model: model, id: private_snippet.id }, format: :json
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -44,25 +44,25 @@
       end
 
       it "returns an error without file" do
-        post :create, model: model, id: snippet.id, format: :json
+        post :create, params: { model: model, id: snippet.id }, format: :json
 
         expect(response).to have_gitlab_http_status(422)
       end
 
       it "returns an error with invalid model" do
-        expect { post :create, model: 'invalid', id: snippet.id, format: :json }
+        expect { post :create, params: { model: 'invalid', id: snippet.id }, format: :json }
         .to raise_error(ActionController::UrlGenerationError)
       end
 
       it "returns 404 status when object not found" do
-        post :create, model: model, id: 9999, format: :json
+        post :create, params: { model: model, id: 9999 }, format: :json
 
         expect(response).to have_gitlab_http_status(404)
       end
 
       context 'with valid image' do
         before do
-          post :create, model: 'personal_snippet', id: snippet.id, file: jpg, format: :json
+          post :create, params: { model: 'personal_snippet', id: snippet.id, file: jpg }, format: :json
         end
 
         it 'returns a content with original filename, new link, and correct type.' do
@@ -82,7 +82,7 @@
 
       context 'with valid non-image file' do
         before do
-          post :create, model: 'personal_snippet', id: snippet.id, file: txt, format: :json
+          post :create, params: { model: 'personal_snippet', id: snippet.id, file: txt }, format: :json
         end
 
         it 'returns a content with original filename, new link, and correct type.' do
@@ -102,7 +102,7 @@
 
       context 'temporal with valid image' do
         subject do
-          post :create, model: 'personal_snippet', file: jpg, format: :json
+          post :create, params: { model: 'personal_snippet', file: jpg }, format: :json
         end
 
         it 'returns a content with original filename, new link, and correct type.' do
@@ -119,7 +119,7 @@
 
       context 'temporal with valid non-image file' do
         subject do
-          post :create, model: 'personal_snippet', file: txt, format: :json
+          post :create, params: { model: 'personal_snippet', file: txt }, format: :json
         end
 
         it 'returns a content with original filename, new link, and correct type.' do
@@ -143,7 +143,7 @@
       context 'for PNG files' do
         it 'returns Content-Disposition: inline' do
           note = create(:note, :with_attachment, project: project)
-          get :show, model: 'note', mounted_as: 'attachment', id: note.id, filename: 'dk.png'
+          get :show, params: { model: 'note', mounted_as: 'attachment', id: note.id, filename: 'dk.png' }
 
           expect(response['Content-Disposition']).to start_with('inline;')
         end
@@ -152,7 +152,7 @@
       context 'for SVG files' do
         it 'returns Content-Disposition: attachment' do
           note = create(:note, :with_svg_attachment, project: project)
-          get :show, model: 'note', mounted_as: 'attachment', id: note.id, filename: 'unsanitized.svg'
+          get :show, params: { model: 'note', mounted_as: 'attachment', id: note.id, filename: 'unsanitized.svg' }
 
           expect(response['Content-Disposition']).to start_with('attachment;')
         end
@@ -171,7 +171,7 @@
           end
 
           it "redirects to the sign in page" do
-            get :show, model: "user", mounted_as: "avatar", id: user.id, filename: "dk.png"
+            get :show, params: { model: "user", mounted_as: "avatar", id: user.id, filename: "dk.png" }
 
             expect(response).to redirect_to(new_user_session_path)
           end
@@ -179,14 +179,14 @@
 
         context "when the user isn't blocked" do
           it "responds with status 200" do
-            get :show, model: "user", mounted_as: "avatar", id: user.id, filename: "dk.png"
+            get :show, params: { model: "user", mounted_as: "avatar", id: user.id, filename: "dk.png" }
 
             expect(response).to have_gitlab_http_status(200)
           end
 
           it_behaves_like 'content not cached without revalidation and no-store' do
             subject do
-              get :show, model: 'user', mounted_as: 'avatar', id: user.id, filename: 'dk.png'
+              get :show, params: { model: 'user', mounted_as: 'avatar', id: user.id, filename: 'dk.png' }
 
               response
             end
@@ -196,14 +196,14 @@
 
       context "when not signed in" do
         it "responds with status 200" do
-          get :show, model: "user", mounted_as: "avatar", id: user.id, filename: "dk.png"
+          get :show, params: { model: "user", mounted_as: "avatar", id: user.id, filename: "dk.png" }
 
           expect(response).to have_gitlab_http_status(200)
         end
 
         it_behaves_like 'content not cached without revalidation' do
           subject do
-            get :show, model: 'user', mounted_as: 'avatar', id: user.id, filename: 'dk.png'
+            get :show, params: { model: 'user', mounted_as: 'avatar', id: user.id, filename: 'dk.png' }
 
             response
           end
@@ -221,14 +221,14 @@
 
         context "when not signed in" do
           it "responds with status 200" do
-            get :show, model: "project", mounted_as: "avatar", id: project.id, filename: "dk.png"
+            get :show, params: { model: "project", mounted_as: "avatar", id: project.id, filename: "dk.png" }
 
             expect(response).to have_gitlab_http_status(200)
           end
 
           it_behaves_like 'content not cached without revalidation' do
             subject do
-              get :show, model: 'project', mounted_as: 'avatar', id: project.id, filename: 'dk.png'
+              get :show, params: { model: 'project', mounted_as: 'avatar', id: project.id, filename: 'dk.png' }
 
               response
             end
@@ -241,14 +241,14 @@
           end
 
           it "responds with status 200" do
-            get :show, model: "project", mounted_as: "avatar", id: project.id, filename: "dk.png"
+            get :show, params: { model: "project", mounted_as: "avatar", id: project.id, filename: "dk.png" }
 
             expect(response).to have_gitlab_http_status(200)
           end
 
           it_behaves_like 'content not cached without revalidation and no-store' do
             subject do
-              get :show, model: 'project', mounted_as: 'avatar', id: project.id, filename: 'dk.png'
+              get :show, params: { model: 'project', mounted_as: 'avatar', id: project.id, filename: 'dk.png' }
 
               response
             end
@@ -263,7 +263,7 @@
 
         context "when not signed in" do
           it "redirects to the sign in page" do
-            get :show, model: "project", mounted_as: "avatar", id: project.id, filename: "dk.png"
+            get :show, params: { model: "project", mounted_as: "avatar", id: project.id, filename: "dk.png" }
 
             expect(response).to redirect_to(new_user_session_path)
           end
@@ -286,7 +286,7 @@
               end
 
               it "redirects to the sign in page" do
-                get :show, model: "project", mounted_as: "avatar", id: project.id, filename: "dk.png"
+                get :show, params: { model: "project", mounted_as: "avatar", id: project.id, filename: "dk.png" }
 
                 expect(response).to redirect_to(new_user_session_path)
               end
@@ -294,14 +294,14 @@
 
             context "when the user isn't blocked" do
               it "responds with status 200" do
-                get :show, model: "project", mounted_as: "avatar", id: project.id, filename: "dk.png"
+                get :show, params: { model: "project", mounted_as: "avatar", id: project.id, filename: "dk.png" }
 
                 expect(response).to have_gitlab_http_status(200)
               end
 
               it_behaves_like 'content not cached without revalidation and no-store' do
                 subject do
-                  get :show, model: 'project', mounted_as: 'avatar', id: project.id, filename: 'dk.png'
+                  get :show, params: { model: 'project', mounted_as: 'avatar', id: project.id, filename: 'dk.png' }
 
                   response
                 end
@@ -311,7 +311,7 @@
 
           context "when the user doesn't have access to the project" do
             it "responds with status 404" do
-              get :show, model: "project", mounted_as: "avatar", id: project.id, filename: "dk.png"
+              get :show, params: { model: "project", mounted_as: "avatar", id: project.id, filename: "dk.png" }
 
               expect(response).to have_gitlab_http_status(404)
             end
@@ -326,14 +326,14 @@
       context "when the group is public" do
         context "when not signed in" do
           it "responds with status 200" do
-            get :show, model: "group", mounted_as: "avatar", id: group.id, filename: "dk.png"
+            get :show, params: { model: "group", mounted_as: "avatar", id: group.id, filename: "dk.png" }
 
             expect(response).to have_gitlab_http_status(200)
           end
 
           it_behaves_like 'content not cached without revalidation' do
             subject do
-              get :show, model: 'group', mounted_as: 'avatar', id: group.id, filename: 'dk.png'
+              get :show, params: { model: 'group', mounted_as: 'avatar', id: group.id, filename: 'dk.png' }
 
               response
             end
@@ -346,14 +346,14 @@
           end
 
           it "responds with status 200" do
-            get :show, model: "group", mounted_as: "avatar", id: group.id, filename: "dk.png"
+            get :show, params: { model: "group", mounted_as: "avatar", id: group.id, filename: "dk.png" }
 
             expect(response).to have_gitlab_http_status(200)
           end
 
           it_behaves_like 'content not cached without revalidation and no-store' do
             subject do
-              get :show, model: 'group', mounted_as: 'avatar', id: group.id, filename: 'dk.png'
+              get :show, params: { model: 'group', mounted_as: 'avatar', id: group.id, filename: 'dk.png' }
 
               response
             end
@@ -382,7 +382,7 @@
               end
 
               it "redirects to the sign in page" do
-                get :show, model: "group", mounted_as: "avatar", id: group.id, filename: "dk.png"
+                get :show, params: { model: "group", mounted_as: "avatar", id: group.id, filename: "dk.png" }
 
                 expect(response).to redirect_to(new_user_session_path)
               end
@@ -390,14 +390,14 @@
 
             context "when the user isn't blocked" do
               it "responds with status 200" do
-                get :show, model: "group", mounted_as: "avatar", id: group.id, filename: "dk.png"
+                get :show, params: { model: "group", mounted_as: "avatar", id: group.id, filename: "dk.png" }
 
                 expect(response).to have_gitlab_http_status(200)
               end
 
               it_behaves_like 'content not cached without revalidation and no-store' do
                 subject do
-                  get :show, model: 'group', mounted_as: 'avatar', id: group.id, filename: 'dk.png'
+                  get :show, params: { model: 'group', mounted_as: 'avatar', id: group.id, filename: 'dk.png' }
 
                   response
                 end
@@ -407,7 +407,7 @@
 
           context "when the user doesn't have access to the project" do
             it "responds with status 404" do
-              get :show, model: "group", mounted_as: "avatar", id: group.id, filename: "dk.png"
+              get :show, params: { model: "group", mounted_as: "avatar", id: group.id, filename: "dk.png" }
 
               expect(response).to have_gitlab_http_status(404)
             end
@@ -427,14 +427,14 @@
 
         context "when not signed in" do
           it "responds with status 200" do
-            get :show, model: "note", mounted_as: "attachment", id: note.id, filename: "dk.png"
+            get :show, params: { model: "note", mounted_as: "attachment", id: note.id, filename: "dk.png" }
 
             expect(response).to have_gitlab_http_status(200)
           end
 
           it_behaves_like 'content not cached without revalidation' do
             subject do
-              get :show, model: 'note', mounted_as: 'attachment', id: note.id, filename: 'dk.png'
+              get :show, params: { model: 'note', mounted_as: 'attachment', id: note.id, filename: 'dk.png' }
 
               response
             end
@@ -447,14 +447,14 @@
           end
 
           it "responds with status 200" do
-            get :show, model: "note", mounted_as: "attachment", id: note.id, filename: "dk.png"
+            get :show, params: { model: "note", mounted_as: "attachment", id: note.id, filename: "dk.png" }
 
             expect(response).to have_gitlab_http_status(200)
           end
 
           it_behaves_like 'content not cached without revalidation and no-store' do
             subject do
-              get :show, model: 'note', mounted_as: 'attachment', id: note.id, filename: 'dk.png'
+              get :show, params: { model: 'note', mounted_as: 'attachment', id: note.id, filename: 'dk.png' }
 
               response
             end
@@ -469,7 +469,7 @@
 
         context "when not signed in" do
           it "redirects to the sign in page" do
-            get :show, model: "note", mounted_as: "attachment", id: note.id, filename: "dk.png"
+            get :show, params: { model: "note", mounted_as: "attachment", id: note.id, filename: "dk.png" }
 
             expect(response).to redirect_to(new_user_session_path)
           end
@@ -492,7 +492,7 @@
               end
 
               it "redirects to the sign in page" do
-                get :show, model: "note", mounted_as: "attachment", id: note.id, filename: "dk.png"
+                get :show, params: { model: "note", mounted_as: "attachment", id: note.id, filename: "dk.png" }
 
                 expect(response).to redirect_to(new_user_session_path)
               end
@@ -500,14 +500,14 @@
 
             context "when the user isn't blocked" do
               it "responds with status 200" do
-                get :show, model: "note", mounted_as: "attachment", id: note.id, filename: "dk.png"
+                get :show, params: { model: "note", mounted_as: "attachment", id: note.id, filename: "dk.png" }
 
                 expect(response).to have_gitlab_http_status(200)
               end
 
               it_behaves_like 'content not cached without revalidation and no-store' do
                 subject do
-                  get :show, model: 'note', mounted_as: 'attachment', id: note.id, filename: 'dk.png'
+                  get :show, params: { model: 'note', mounted_as: 'attachment', id: note.id, filename: 'dk.png' }
 
                   response
                 end
@@ -517,7 +517,7 @@
 
           context "when the user doesn't have access to the project" do
             it "responds with status 404" do
-              get :show, model: "note", mounted_as: "attachment", id: note.id, filename: "dk.png"
+              get :show, params: { model: "note", mounted_as: "attachment", id: note.id, filename: "dk.png" }
 
               expect(response).to have_gitlab_http_status(404)
             end
@@ -532,14 +532,14 @@
 
         context 'when not signed in' do
           it 'responds with status 200' do
-            get :show, model: 'appearance', mounted_as: 'header_logo', id: appearance.id, filename: 'dk.png'
+            get :show, params: { model: 'appearance', mounted_as: 'header_logo', id: appearance.id, filename: 'dk.png' }
 
             expect(response).to have_gitlab_http_status(200)
           end
 
           it_behaves_like 'content not cached without revalidation' do
             subject do
-              get :show, model: 'appearance', mounted_as: 'header_logo', id: appearance.id, filename: 'dk.png'
+              get :show, params: { model: 'appearance', mounted_as: 'header_logo', id: appearance.id, filename: 'dk.png' }
 
               response
             end
@@ -552,14 +552,14 @@
 
         context 'when not signed in' do
           it 'responds with status 200' do
-            get :show, model: 'appearance', mounted_as: 'logo', id: appearance.id, filename: 'dk.png'
+            get :show, params: { model: 'appearance', mounted_as: 'logo', id: appearance.id, filename: 'dk.png' }
 
             expect(response).to have_gitlab_http_status(200)
           end
 
           it_behaves_like 'content not cached without revalidation' do
             subject do
-              get :show, model: 'appearance', mounted_as: 'logo', id: appearance.id, filename: 'dk.png'
+              get :show, params: { model: 'appearance', mounted_as: 'logo', id: appearance.id, filename: 'dk.png' }
 
               response
             end
@@ -573,7 +573,7 @@
 
       context 'has a valid filename on the original file' do
         it 'successfully returns the file' do
-          get :show, model: 'appearance', mounted_as: 'favicon', id: appearance.id, filename: 'dk.png'
+          get :show, params: { model: 'appearance', mounted_as: 'favicon', id: appearance.id, filename: 'dk.png' }
 
           expect(response).to have_gitlab_http_status(200)
           expect(response.header['Content-Disposition']).to end_with 'filename="dk.png"'
@@ -582,7 +582,7 @@
 
       context 'has an invalid filename on the original file' do
         it 'returns a 404' do
-          get :show, model: 'appearance', mounted_as: 'favicon', id: appearance.id, filename: 'bogus.png'
+          get :show, params: { model: 'appearance', mounted_as: 'favicon', id: appearance.id, filename: 'bogus.png' }
 
           expect(response).to have_gitlab_http_status(404)
         end
diff --git a/spec/controllers/user_callouts_controller_spec.rb b/spec/controllers/user_callouts_controller_spec.rb
index 48e2ff75cac24aa1d8a97fe17de751d7b53787d2..c71d75a3e7fded42ee3faee09669724fc0bcbc31 100644
--- a/spec/controllers/user_callouts_controller_spec.rb
+++ b/spec/controllers/user_callouts_controller_spec.rb
@@ -8,7 +8,7 @@
   end
 
   describe "POST #create" do
-    subject { post :create, feature_name: feature_name, format: :json }
+    subject { post :create, params: { feature_name: feature_name }, format: :json }
 
     context 'with valid feature name' do
       let(:feature_name) { UserCallout.feature_names.keys.first }
diff --git a/spec/controllers/users/terms_controller_spec.rb b/spec/controllers/users/terms_controller_spec.rb
index 0d77e91a67d07f0847e5bb28e3d3dcb41f4d8a53..cbfd2b17864f3fd2e56a2bf4b49248232dd8e58f 100644
--- a/spec/controllers/users/terms_controller_spec.rb
+++ b/spec/controllers/users/terms_controller_spec.rb
@@ -40,7 +40,7 @@
 
   describe 'POST #accept' do
     it 'saves that the user accepted the terms' do
-      post :accept, id: term.id
+      post :accept, params: { id: term.id }
 
       agreement = user.term_agreements.find_by(term: term)
 
@@ -48,7 +48,7 @@
     end
 
     it 'redirects to a path when specified' do
-      post :accept, id: term.id, redirect: groups_path
+      post :accept, params: { id: term.id, redirect: groups_path }
 
       expect(response).to redirect_to(groups_path)
     end
@@ -56,14 +56,14 @@
     it 'redirects to the referer when no redirect specified' do
       request.env["HTTP_REFERER"] = groups_url
 
-      post :accept, id: term.id
+      post :accept, params: { id: term.id }
 
       expect(response).to redirect_to(groups_path)
     end
 
     context 'redirecting to another domain' do
       it 'is prevented when passing a redirect param' do
-        post :accept, id: term.id, redirect: '//example.com/random/path'
+        post :accept, params: { id: term.id, redirect: '//example.com/random/path' }
 
         expect(response).to redirect_to(root_path)
       end
@@ -71,7 +71,7 @@
       it 'is prevented when redirecting to the referer' do
         request.env["HTTP_REFERER"] = 'http://example.com/and/a/path'
 
-        post :accept, id: term.id
+        post :accept, params: { id: term.id }
 
         expect(response).to redirect_to(root_path)
       end
@@ -80,7 +80,7 @@
 
   describe 'POST #decline' do
     it 'stores that the user declined the terms' do
-      post :decline, id: term.id
+      post :decline, params: { id: term.id }
 
       agreement = user.term_agreements.find_by(term: term)
 
@@ -88,7 +88,7 @@
     end
 
     it 'signs out the user' do
-      post :decline, id: term.id
+      post :decline, params: { id: term.id }
 
       expect(response).to redirect_to(root_path)
       expect(assigns(:current_user)).to be_nil
diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb
index fe438e71e9eaaaffff3924c04f85820f8ab96541..27edf226ca3cb6fda53aaae4b5ce8e3924701a5c 100644
--- a/spec/controllers/users_controller_spec.rb
+++ b/spec/controllers/users_controller_spec.rb
@@ -15,7 +15,7 @@
         end
 
         it 'renders the show template' do
-          get :show, username: user.username
+          get :show, params: { username: user.username }
 
           expect(response).to be_success
           expect(response).to render_template('show')
@@ -24,7 +24,7 @@
 
       describe 'when logged out' do
         it 'renders the show template' do
-          get :show, username: user.username
+          get :show, params: { username: user.username }
 
           expect(response).to have_gitlab_http_status(200)
           expect(response).to render_template('show')
@@ -39,7 +39,7 @@
 
       context 'when logged out' do
         it 'redirects to login page' do
-          get :show, username: user.username
+          get :show, params: { username: user.username }
           expect(response).to redirect_to new_user_session_path
         end
       end
@@ -50,7 +50,7 @@
         end
 
         it 'renders show' do
-          get :show, username: user.username
+          get :show, params: { username: user.username }
           expect(response).to have_gitlab_http_status(200)
           expect(response).to render_template('show')
         end
@@ -60,7 +60,7 @@
     context 'when a user by that username does not exist' do
       context 'when logged out' do
         it 'redirects to login page' do
-          get :show, username: 'nonexistent'
+          get :show, params: { username: 'nonexistent' }
           expect(response).to redirect_to new_user_session_path
         end
       end
@@ -71,7 +71,7 @@
         end
 
         it 'renders 404' do
-          get :show, username: 'nonexistent'
+          get :show, params: { username: 'nonexistent' }
           expect(response).to have_gitlab_http_status(404)
         end
       end
@@ -87,7 +87,7 @@
       end
 
       it 'loads events' do
-        get :show, username: user, format: :json
+        get :show, params: { username: user }, format: :json
 
         expect(assigns(:events)).not_to be_empty
       end
@@ -96,7 +96,7 @@
         allow(Ability).to receive(:allowed?).and_call_original
         expect(Ability).to receive(:allowed?).with(user, :read_cross_project) { false }
 
-        get :show, username: user, format: :json
+        get :show, params: { username: user }, format: :json
 
         expect(assigns(:events)).to be_empty
       end
@@ -104,7 +104,7 @@
       it 'hides events if the user has a private profile' do
         Gitlab::DataBuilder::Push.build_sample(project, private_user)
 
-        get :show, username: private_user.username, format: :json
+        get :show, params: { username: private_user.username }, format: :json
 
         expect(assigns(:events)).to be_empty
       end
@@ -125,7 +125,7 @@
           push_data = Gitlab::DataBuilder::Push.build_sample(project, public_user)
           EventCreateService.new.push(project, public_user, push_data)
 
-          get :calendar, username: public_user.username, format: :json
+          get :calendar, params: { username: public_user.username }, format: :json
 
           expect(response).to have_gitlab_http_status(200)
         end
@@ -136,7 +136,7 @@
           push_data = Gitlab::DataBuilder::Push.build_sample(project, private_user)
           EventCreateService.new.push(project, private_user, push_data)
 
-          get :calendar, username: private_user.username, format: :json
+          get :calendar, params: { username: private_user.username }, format: :json
 
           expect(response).to have_gitlab_http_status(:not_found)
         end
@@ -161,7 +161,7 @@
       end
 
       it 'includes forked projects' do
-        get :calendar, username: user.username
+        get :calendar, params: { username: user.username }
         expect(assigns(:contributions_calendar).projects.count).to eq(2)
       end
     end
@@ -179,7 +179,7 @@
     end
 
     it 'assigns @calendar_date' do
-      get :calendar_activities, username: user.username, date: '2014-07-31'
+      get :calendar_activities, params: { username: user.username, date: '2014-07-31' }
       expect(assigns(:calendar_date)).to eq(Date.parse('2014-07-31'))
     end
 
@@ -189,7 +189,7 @@
           push_data = Gitlab::DataBuilder::Push.build_sample(project, public_user)
           EventCreateService.new.push(project, public_user, push_data)
 
-          get :calendar_activities, username: public_user.username
+          get :calendar_activities, params: { username: public_user.username }
           expect(assigns[:events]).not_to be_empty
         end
       end
@@ -199,7 +199,7 @@
           push_data = Gitlab::DataBuilder::Push.build_sample(project, private_user)
           EventCreateService.new.push(project, private_user, push_data)
 
-          get :calendar_activities, username: private_user.username
+          get :calendar_activities, params: { username: private_user.username }
           expect(response).to have_gitlab_http_status(:not_found)
         end
       end
@@ -213,7 +213,7 @@
 
     context 'format html' do
       it 'renders snippets page' do
-        get :snippets, username: user.username
+        get :snippets, params: { username: user.username }
         expect(response).to have_gitlab_http_status(200)
         expect(response).to render_template('show')
       end
@@ -221,7 +221,7 @@
 
     context 'format json' do
       it 'response with snippets json data' do
-        get :snippets, username: user.username, format: :json
+        get :snippets, params: { username: user.username }, format: :json
         expect(response).to have_gitlab_http_status(200)
         expect(JSON.parse(response.body)).to have_key('html')
       end
@@ -235,7 +235,7 @@
 
     context 'when user exists' do
       it 'returns JSON indicating the user exists' do
-        get :exists, username: user.username
+        get :exists, params: { username: user.username }
 
         expected_json = { exists: true }.to_json
         expect(response.body).to eq(expected_json)
@@ -245,7 +245,7 @@
         let(:user) { create(:user, username: 'CamelCaseUser') }
 
         it 'returns JSON indicating the user exists' do
-          get :exists, username: user.username.downcase
+          get :exists, params: { username: user.username.downcase }
 
           expected_json = { exists: true }.to_json
           expect(response.body).to eq(expected_json)
@@ -255,7 +255,7 @@
 
     context 'when the user does not exist' do
       it 'returns JSON indicating the user does not exist' do
-        get :exists, username: 'foo'
+        get :exists, params: { username: 'foo' }
 
         expected_json = { exists: false }.to_json
         expect(response.body).to eq(expected_json)
@@ -265,7 +265,7 @@
         let(:redirect_route) { user.namespace.redirect_routes.create(path: 'old-username') }
 
         it 'returns JSON indicating a user by that username does not exist' do
-          get :exists, username: 'old-username'
+          get :exists, params: { username: 'old-username' }
 
           expected_json = { exists: false }.to_json
           expect(response.body).to eq(expected_json)
@@ -286,7 +286,7 @@
 
           context 'with exactly matching casing' do
             it 'responds with success' do
-              get :show, username: user.username
+              get :show, params: { username: user.username }
 
               expect(response).to be_success
             end
@@ -294,7 +294,7 @@
 
           context 'with different casing' do
             it 'redirects to the correct casing' do
-              get :show, username: user.username.downcase
+              get :show, params: { username: user.username.downcase }
 
               expect(response).to redirect_to(user)
               expect(controller).not_to set_flash[:notice]
@@ -306,7 +306,7 @@
           let(:redirect_route) { user.namespace.redirect_routes.create(path: 'old-path') }
 
           it 'redirects to the canonical path' do
-            get :show, username: redirect_route.path
+            get :show, params: { username: redirect_route.path }
 
             expect(response).to redirect_to(user)
             expect(controller).to set_flash[:notice].to(user_moved_message(redirect_route, user))
@@ -316,7 +316,7 @@
             let(:redirect_route) { user.namespace.redirect_routes.create(path: 'http') }
 
             it 'does not modify the requested host' do
-              get :show, username: redirect_route.path
+              get :show, params: { username: redirect_route.path }
 
               expect(response).to redirect_to(user)
               expect(controller).to set_flash[:notice].to(user_moved_message(redirect_route, user))
@@ -327,7 +327,7 @@
             let(:redirect_route) { user.namespace.redirect_routes.create(path: 'ser') }
 
             it 'redirects to the canonical path' do
-              get :show, username: redirect_route.path
+              get :show, params: { username: redirect_route.path }
 
               expect(response).to redirect_to(user)
               expect(controller).to set_flash[:notice].to(user_moved_message(redirect_route, user))
@@ -342,7 +342,7 @@
 
           context 'with exactly matching casing' do
             it 'responds with success' do
-              get :projects, username: user.username
+              get :projects, params: { username: user.username }
 
               expect(response).to be_success
             end
@@ -350,7 +350,7 @@
 
           context 'with different casing' do
             it 'redirects to the correct casing' do
-              get :projects, username: user.username.downcase
+              get :projects, params: { username: user.username.downcase }
 
               expect(response).to redirect_to(user_projects_path(user))
               expect(controller).not_to set_flash[:notice]
@@ -362,7 +362,7 @@
           let(:redirect_route) { user.namespace.redirect_routes.create(path: 'old-path') }
 
           it 'redirects to the canonical path' do
-            get :projects, username: redirect_route.path
+            get :projects, params: { username: redirect_route.path }
 
             expect(response).to redirect_to(user_projects_path(user))
             expect(controller).to set_flash[:notice].to(user_moved_message(redirect_route, user))
@@ -372,7 +372,7 @@
             let(:redirect_route) { user.namespace.redirect_routes.create(path: 'http') }
 
             it 'does not modify the requested host' do
-              get :projects, username: redirect_route.path
+              get :projects, params: { username: redirect_route.path }
 
               expect(response).to redirect_to(user_projects_path(user))
               expect(controller).to set_flash[:notice].to(user_moved_message(redirect_route, user))
@@ -384,7 +384,7 @@
 
             # I.e. /users/ser should not become /ufoos/ser
             it 'does not modify the /users part of the path' do
-              get :projects, username: redirect_route.path
+              get :projects, params: { username: redirect_route.path }
 
               expect(response).to redirect_to(user_projects_path(user))
               expect(controller).to set_flash[:notice].to(user_moved_message(redirect_route, user))
diff --git a/spec/initializers/lograge_spec.rb b/spec/initializers/lograge_spec.rb
index af54a777373969c498d5c87cb3b2a9968eae481b..24d366731a2668d8193840b1b569880194027b49 100644
--- a/spec/initializers/lograge_spec.rb
+++ b/spec/initializers/lograge_spec.rb
@@ -6,7 +6,7 @@
   let(:headers) { { 'X-Request-ID' => 'new-correlation-id' } }
 
   context 'for API requests' do
-    subject { get("/api/v4/endpoint", {}, headers) }
+    subject { get("/api/v4/endpoint", params: {}, headers: headers) }
 
     it 'logs to api_json log' do
       # we assert receiving parameters by grape logger
@@ -19,7 +19,7 @@
   end
 
   context 'for Controller requests' do
-    subject { get("/", {}, headers) }
+    subject { get("/", params: {}, headers: headers) }
 
     it 'logs to production_json log' do
       # formatter receives a hash with correlation id
diff --git a/spec/lib/mattermost/session_spec.rb b/spec/lib/mattermost/session_spec.rb
index f18f97a9c6ab27f2b479978fb28b893f8a488d14..77fea5b2d248e301415a07a00e6cefc47ae300f9 100644
--- a/spec/lib/mattermost/session_spec.rb
+++ b/spec/lib/mattermost/session_spec.rb
@@ -67,11 +67,13 @@
             .with(query: hash_including({ 'state' => state }))
             .to_return do |request|
               post "/oauth/token",
-                client_id: doorkeeper.uid,
-                client_secret: doorkeeper.secret,
-                redirect_uri: params[:redirect_uri],
-                grant_type: 'authorization_code',
-                code: request.uri.query_values['code']
+                params: {
+                  client_id: doorkeeper.uid,
+                  client_secret: doorkeeper.secret,
+                  redirect_uri: params[:redirect_uri],
+                  grant_type: 'authorization_code',
+                  code: request.uri.query_values['code']
+                }
 
               if response.status == 200
                 { headers: { 'token' => 'thisworksnow' }, status: 202 }
diff --git a/spec/requests/api/access_requests_spec.rb b/spec/requests/api/access_requests_spec.rb
index e13129967b2765d94187a214936c89e87e01e716..1af6602ea9e60b83d063e21c89026985ca4cf5c5 100644
--- a/spec/requests/api/access_requests_spec.rb
+++ b/spec/requests/api/access_requests_spec.rb
@@ -145,7 +145,7 @@
         it 'returns 201' do
           expect do
             put api("/#{source_type.pluralize}/#{source.id}/access_requests/#{access_requester.id}/approve", maintainer),
-                access_level: Member::MAINTAINER
+                params: { access_level: Member::MAINTAINER }
 
             expect(response).to have_gitlab_http_status(201)
           end.to change { source.members.count }.by(1)
diff --git a/spec/requests/api/applications_spec.rb b/spec/requests/api/applications_spec.rb
index 6154be5c425f947455d201bd1b664271b3d6ea41..e47166544d9e0f5b141758ce228d8026c3e3a3f5 100644
--- a/spec/requests/api/applications_spec.rb
+++ b/spec/requests/api/applications_spec.rb
@@ -11,7 +11,7 @@
     context 'authenticated and authorized user' do
       it 'creates and returns an OAuth application' do
         expect do
-          post api('/applications', admin_user), name: 'application_name', redirect_uri: 'http://application.url', scopes: ''
+          post api('/applications', admin_user), params: { name: 'application_name', redirect_uri: 'http://application.url', scopes: '' }
         end.to change { Doorkeeper::Application.count }.by 1
 
         application = Doorkeeper::Application.find_by(name: 'application_name', redirect_uri: 'http://application.url')
@@ -25,7 +25,7 @@
 
       it 'does not allow creating an application with the wrong redirect_uri format' do
         expect do
-          post api('/applications', admin_user), name: 'application_name', redirect_uri: 'http://', scopes: ''
+          post api('/applications', admin_user), params: { name: 'application_name', redirect_uri: 'http://', scopes: '' }
         end.not_to change { Doorkeeper::Application.count }
 
         expect(response).to have_gitlab_http_status(400)
@@ -35,7 +35,7 @@
 
       it 'does not allow creating an application with a forbidden URI format' do
         expect do
-          post api('/applications', admin_user), name: 'application_name', redirect_uri: 'javascript://alert()', scopes: ''
+          post api('/applications', admin_user), params: { name: 'application_name', redirect_uri: 'javascript://alert()', scopes: '' }
         end.not_to change { Doorkeeper::Application.count }
 
         expect(response).to have_gitlab_http_status(400)
@@ -45,7 +45,7 @@
 
       it 'does not allow creating an application without a name' do
         expect do
-          post api('/applications', admin_user), redirect_uri: 'http://application.url', scopes: ''
+          post api('/applications', admin_user), params: { redirect_uri: 'http://application.url', scopes: '' }
         end.not_to change { Doorkeeper::Application.count }
 
         expect(response).to have_gitlab_http_status(400)
@@ -55,7 +55,7 @@
 
       it 'does not allow creating an application without a redirect_uri' do
         expect do
-          post api('/applications', admin_user), name: 'application_name', scopes: ''
+          post api('/applications', admin_user), params: { name: 'application_name', scopes: '' }
         end.not_to change { Doorkeeper::Application.count }
 
         expect(response).to have_gitlab_http_status(400)
@@ -65,7 +65,7 @@
 
       it 'does not allow creating an application without scopes' do
         expect do
-          post api('/applications', admin_user), name: 'application_name', redirect_uri: 'http://application.url'
+          post api('/applications', admin_user), params: { name: 'application_name', redirect_uri: 'http://application.url' }
         end.not_to change { Doorkeeper::Application.count }
 
         expect(response).to have_gitlab_http_status(400)
@@ -77,7 +77,7 @@
     context 'authorized user without authorization' do
       it 'does not create application' do
         expect do
-          post api('/applications', user), name: 'application_name', redirect_uri: 'http://application.url', scopes: ''
+          post api('/applications', user), params: { name: 'application_name', redirect_uri: 'http://application.url', scopes: '' }
         end.not_to change { Doorkeeper::Application.count }
 
         expect(response).to have_gitlab_http_status(403)
@@ -87,7 +87,7 @@
     context 'non-authenticated user' do
       it 'does not create application' do
         expect do
-          post api('/applications'), name: 'application_name', redirect_uri: 'http://application.url'
+          post api('/applications'), params: { name: 'application_name', redirect_uri: 'http://application.url' }
         end.not_to change { Doorkeeper::Application.count }
 
         expect(response).to have_gitlab_http_status(401)
diff --git a/spec/requests/api/avatar_spec.rb b/spec/requests/api/avatar_spec.rb
index 26e0435a6d507b38d730cd184776f8508d08ef62..17e66725dc9272e877c923212f7f4fd0345a9c5d 100644
--- a/spec/requests/api/avatar_spec.rb
+++ b/spec/requests/api/avatar_spec.rb
@@ -13,7 +13,7 @@
         end
 
         it 'returns the avatar url' do
-          get api('/avatar'), { email: 'public@example.com' }
+          get api('/avatar'), params: { email: 'public@example.com' }
 
           expect(response.status).to eq 200
           expect(json_response['avatar_url']).to eql("#{::Settings.gitlab.base_url}#{user.avatar.local_url}")
@@ -30,7 +30,7 @@
         end
 
         it 'returns the avatar url from Gravatar' do
-          get api('/avatar'), { email: 'private@example.com' }
+          get api('/avatar'), params: { email: 'private@example.com' }
 
           expect(response.status).to eq 200
           expect(json_response['avatar_url']).to eq('https://gravatar')
@@ -53,7 +53,7 @@
         end
 
         it 'returns the avatar url from Gravatar' do
-          get api('/avatar'), { email: 'public@example.com' }
+          get api('/avatar'), params: { email: 'public@example.com' }
 
           expect(response.status).to eq 200
           expect(json_response['avatar_url']).to eq('https://gravatar')
@@ -70,7 +70,7 @@
         end
 
         it 'returns the avatar url from Gravatar' do
-          get api('/avatar'), { email: 'private@example.com' }
+          get api('/avatar'), params: { email: 'private@example.com' }
 
           expect(response.status).to eq 200
           expect(json_response['avatar_url']).to eq('https://gravatar')
@@ -88,7 +88,7 @@
 
         context 'when authenticated' do
           it 'returns the avatar url' do
-            get api('/avatar', user), { email: 'public@example.com' }
+            get api('/avatar', user), params: { email: 'public@example.com' }
 
             expect(response.status).to eq 200
             expect(json_response['avatar_url']).to eql("#{::Settings.gitlab.base_url}#{user.avatar.local_url}")
@@ -97,7 +97,7 @@
 
         context 'when unauthenticated' do
           it_behaves_like '403 response' do
-            let(:request) { get api('/avatar'), { email: 'public@example.com' } }
+            let(:request) { get api('/avatar'), params: { email: 'public@example.com' } }
           end
         end
       end
diff --git a/spec/requests/api/award_emoji_spec.rb b/spec/requests/api/award_emoji_spec.rb
index 7f3f3ab0977450e6229f20cc94c797293bd0a49c..22f6fcdc9225694ad1553768ca8b8ca2e85e379f 100644
--- a/spec/requests/api/award_emoji_spec.rb
+++ b/spec/requests/api/award_emoji_spec.rb
@@ -148,7 +148,7 @@
 
     context "on an issue" do
       it "creates a new award emoji" do
-        post api("/projects/#{project.id}/issues/#{issue.iid}/award_emoji", user), name: 'blowfish'
+        post api("/projects/#{project.id}/issues/#{issue.iid}/award_emoji", user), params: { name: 'blowfish' }
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['name']).to eq('blowfish')
@@ -162,21 +162,21 @@
       end
 
       it "returns a 401 unauthorized error if the user is not authenticated" do
-        post api("/projects/#{project.id}/issues/#{issue.iid}/award_emoji"), name: 'thumbsup'
+        post api("/projects/#{project.id}/issues/#{issue.iid}/award_emoji"), params: { name: 'thumbsup' }
 
         expect(response).to have_gitlab_http_status(401)
       end
 
       it "normalizes +1 as thumbsup award" do
-        post api("/projects/#{project.id}/issues/#{issue.iid}/award_emoji", user), name: '+1'
+        post api("/projects/#{project.id}/issues/#{issue.iid}/award_emoji", user), params: { name: '+1' }
 
         expect(issue.award_emoji.last.name).to eq("thumbsup")
       end
 
       context 'when the emoji already has been awarded' do
         it 'returns a 404 status code' do
-          post api("/projects/#{project.id}/issues/#{issue.iid}/award_emoji", user), name: 'thumbsup'
-          post api("/projects/#{project.id}/issues/#{issue.iid}/award_emoji", user), name: 'thumbsup'
+          post api("/projects/#{project.id}/issues/#{issue.iid}/award_emoji", user), params: { name: 'thumbsup' }
+          post api("/projects/#{project.id}/issues/#{issue.iid}/award_emoji", user), params: { name: 'thumbsup' }
 
           expect(response).to have_gitlab_http_status(404)
           expect(json_response["message"]).to match("has already been taken")
@@ -188,7 +188,7 @@
       it 'creates a new award emoji' do
         snippet = create(:project_snippet, :public, project: project)
 
-        post api("/projects/#{project.id}/snippets/#{snippet.id}/award_emoji", user), name: 'blowfish'
+        post api("/projects/#{project.id}/snippets/#{snippet.id}/award_emoji", user), params: { name: 'blowfish' }
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['name']).to eq('blowfish')
@@ -202,7 +202,7 @@
 
     it 'creates a new award emoji' do
       expect do
-        post api("/projects/#{project.id}/issues/#{issue.iid}/notes/#{note.id}/award_emoji", user), name: 'rocket'
+        post api("/projects/#{project.id}/issues/#{issue.iid}/notes/#{note.id}/award_emoji", user), params: { name: 'rocket' }
       end.to change { note.award_emoji.count }.from(0).to(1)
 
       expect(response).to have_gitlab_http_status(201)
@@ -210,15 +210,15 @@
     end
 
     it "normalizes +1 as thumbsup award" do
-      post api("/projects/#{project.id}/issues/#{issue.iid}/notes/#{note.id}/award_emoji", user), name: '+1'
+      post api("/projects/#{project.id}/issues/#{issue.iid}/notes/#{note.id}/award_emoji", user), params: { name: '+1' }
 
       expect(note.award_emoji.last.name).to eq("thumbsup")
     end
 
     context 'when the emoji already has been awarded' do
       it 'returns a 404 status code' do
-        post api("/projects/#{project.id}/issues/#{issue.iid}/notes/#{note.id}/award_emoji", user), name: 'rocket'
-        post api("/projects/#{project.id}/issues/#{issue.iid}/notes/#{note.id}/award_emoji", user), name: 'rocket'
+        post api("/projects/#{project.id}/issues/#{issue.iid}/notes/#{note.id}/award_emoji", user), params: { name: 'rocket' }
+        post api("/projects/#{project.id}/issues/#{issue.iid}/notes/#{note.id}/award_emoji", user), params: { name: 'rocket' }
 
         expect(response).to have_gitlab_http_status(404)
         expect(json_response["message"]).to match("has already been taken")
diff --git a/spec/requests/api/badges_spec.rb b/spec/requests/api/badges_spec.rb
index e232e2e04ee0cdb81d88af1c6d2e2a903b0bd791..1271324a2baac5347f452dae243831c03bac5bc9 100644
--- a/spec/requests/api/badges_spec.rb
+++ b/spec/requests/api/badges_spec.rb
@@ -103,7 +103,7 @@ def get_source(source_type)
       it_behaves_like 'a 404 response when source is private' do
         let(:route) do
           post api("/#{source_type.pluralize}/#{source.id}/badges", stranger),
-               link_url: example_url, image_url: example_url2
+               params: { link_url: example_url, image_url: example_url2 }
         end
       end
 
@@ -114,7 +114,7 @@ def get_source(source_type)
               user = public_send(type)
 
               post api("/#{source_type.pluralize}/#{source.id}/badges", user),
-                   link_url: example_url, image_url: example_url2
+                   params: { link_url: example_url, image_url: example_url2 }
 
               expect(response).to have_gitlab_http_status(403)
             end
@@ -126,7 +126,7 @@ def get_source(source_type)
         it 'creates a new badge' do
           expect do
             post api("/#{source_type.pluralize}/#{source.id}/badges", maintainer),
-                link_url: example_url, image_url: example_url2
+                params: { link_url: example_url, image_url: example_url2 }
 
             expect(response).to have_gitlab_http_status(201)
           end.to change { source.badges.count }.by(1)
@@ -139,21 +139,21 @@ def get_source(source_type)
 
       it 'returns 400 when link_url is not given' do
         post api("/#{source_type.pluralize}/#{source.id}/badges", maintainer),
-             link_url: example_url
+             params: { link_url: example_url }
 
         expect(response).to have_gitlab_http_status(400)
       end
 
       it 'returns 400 when image_url is not given' do
         post api("/#{source_type.pluralize}/#{source.id}/badges", maintainer),
-             image_url: example_url2
+             params: { image_url: example_url2 }
 
         expect(response).to have_gitlab_http_status(400)
       end
 
       it 'returns 400 when link_url or image_url is not valid' do
         post api("/#{source_type.pluralize}/#{source.id}/badges", maintainer),
-             link_url: 'whatever', image_url: 'whatever'
+             params: { link_url: 'whatever', image_url: 'whatever' }
 
         expect(response).to have_gitlab_http_status(400)
       end
@@ -173,7 +173,7 @@ def get_source(source_type)
       it_behaves_like 'a 404 response when source is private' do
         let(:route) do
           put api("/#{source_type.pluralize}/#{source.id}/badges/#{badge.id}", stranger),
-              link_url: example_url
+              params: { link_url: example_url }
         end
       end
 
@@ -184,7 +184,7 @@ def get_source(source_type)
               user = public_send(type)
 
               put api("/#{source_type.pluralize}/#{source.id}/badges/#{badge.id}", user),
-                  link_url: example_url
+                  params: { link_url: example_url }
 
               expect(response).to have_gitlab_http_status(403)
             end
@@ -195,7 +195,7 @@ def get_source(source_type)
       context 'when authenticated as a maintainer/owner' do
         it 'updates the member' do
           put api("/#{source_type.pluralize}/#{source.id}/badges/#{badge.id}", maintainer),
-              link_url: example_url, image_url: example_url2
+              params: { link_url: example_url, image_url: example_url2 }
 
           expect(response).to have_gitlab_http_status(200)
           expect(json_response['link_url']).to eq(example_url)
@@ -206,7 +206,7 @@ def get_source(source_type)
 
       it 'returns 400 when link_url or image_url is not valid' do
         put api("/#{source_type.pluralize}/#{source.id}/badges/#{badge.id}", maintainer),
-            link_url: 'whatever', image_url: 'whatever'
+            params: { link_url: 'whatever', image_url: 'whatever' }
 
         expect(response).to have_gitlab_http_status(400)
       end
diff --git a/spec/requests/api/boards_spec.rb b/spec/requests/api/boards_spec.rb
index 7710f19ce4e7d25da2d03071691955796afd05e9..ab4f42cad4761c482931867de62faf018b416a58 100644
--- a/spec/requests/api/boards_spec.rb
+++ b/spec/requests/api/boards_spec.rb
@@ -41,7 +41,7 @@
       group_label = create(:group_label, group: group)
       board_parent.update(group: group)
 
-      post api(url, user), label_id: group_label.id
+      post api(url, user), params: { label_id: group_label.id }
 
       expect(response).to have_gitlab_http_status(201)
       expect(json_response['label']['name']).to eq(group_label.title)
@@ -56,7 +56,7 @@
       group.add_developer(user)
       sub_group.add_developer(user)
 
-      post api(url, user), label_id: group_label.id
+      post api(url, user), params: { label_id: group_label.id }
 
       expect(response).to have_gitlab_http_status(201)
       expect(json_response['label']['name']).to eq(group_label.title)
@@ -73,7 +73,7 @@
       group.add_developer(user)
       group_label = create(:group_label, group: group)
 
-      post api(url, user), label_id: group_label.id
+      post api(url, user), params: { label_id: group_label.id }
 
       expect(response).to have_gitlab_http_status(201)
       expect(json_response['label']['name']).to eq(group_label.title)
diff --git a/spec/requests/api/branches_spec.rb b/spec/requests/api/branches_spec.rb
index fce8ad3ea8fac8c18e939929198236929dbde926..bae64d71dcae08121fb73e7a77b0bab931115970 100644
--- a/spec/requests/api/branches_spec.rb
+++ b/spec/requests/api/branches_spec.rb
@@ -21,7 +21,7 @@
 
     shared_examples_for 'repository branches' do
       it 'returns the repository branches' do
-        get api(route, current_user), per_page: 100
+        get api(route, current_user), params: { per_page: 100 }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to match_response_schema('public_api/v4/branches')
@@ -42,7 +42,7 @@
     context 'when search parameter is passed' do
       context 'and branch exists' do
         it 'returns correct branches' do
-          get api(route, user), per_page: 100, search: branch_name
+          get api(route, user), params: { per_page: 100, search: branch_name }
 
           searched_branch_names = json_response.map { |branch| branch['name'] }
           project_branch_names = project.repository.branch_names.grep(/#{branch_name}/)
@@ -53,7 +53,7 @@
 
       context 'and branch does not exist' do
         it 'returns an empty array' do
-          get api(route, user), per_page: 100, search: 'no_such_branch_name_entropy_of_jabadabadu'
+          get api(route, user), params: { per_page: 100, search: 'no_such_branch_name_entropy_of_jabadabadu' }
 
           expect(json_response).to eq []
         end
@@ -252,7 +252,7 @@
       end
 
       it 'protects a single branch and developers can push' do
-        put api(route, current_user), developers_can_push: true
+        put api(route, current_user), params: { developers_can_push: true }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to match_response_schema('public_api/v4/branch')
@@ -263,7 +263,7 @@
       end
 
       it 'protects a single branch and developers can merge' do
-        put api(route, current_user), developers_can_merge: true
+        put api(route, current_user), params: { developers_can_merge: true }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to match_response_schema('public_api/v4/branch')
@@ -274,7 +274,7 @@
       end
 
       it 'protects a single branch and developers can push and merge' do
-        put api(route, current_user), developers_can_push: true, developers_can_merge: true
+        put api(route, current_user), params: { developers_can_push: true, developers_can_merge: true }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to match_response_schema('public_api/v4/branch')
@@ -373,7 +373,7 @@
 
           it 'updates that a developer cannot push or merge' do
             put api("/projects/#{project.id}/repository/branches/#{protected_branch.name}/protect", user),
-                developers_can_push: false, developers_can_merge: false
+                params: { developers_can_push: false, developers_can_merge: false }
 
             expect(response).to have_gitlab_http_status(200)
             expect(response).to match_response_schema('public_api/v4/branch')
@@ -391,7 +391,7 @@
 
           it 'updates that a developer can push and merge' do
             put api("/projects/#{project.id}/repository/branches/#{protected_branch.name}/protect", user),
-                developers_can_push: true, developers_can_merge: true
+                params: { developers_can_push: true, developers_can_merge: true }
 
             expect(response).to have_gitlab_http_status(200)
             expect(response).to match_response_schema('public_api/v4/branch')
@@ -517,7 +517,7 @@
 
     shared_examples_for 'repository new branch' do
       it 'creates a new branch' do
-        post api(route, current_user), branch: 'feature1', ref: branch_sha
+        post api(route, current_user), params: { branch: 'feature1', ref: branch_sha }
 
         expect(response).to have_gitlab_http_status(201)
         expect(response).to match_response_schema('public_api/v4/branch')
@@ -562,25 +562,25 @@
     end
 
     it 'returns 400 if branch name is invalid' do
-      post api(route, user), branch: 'new design', ref: branch_sha
+      post api(route, user), params: { branch: 'new design', ref: branch_sha }
 
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['message']).to eq('Branch name is invalid')
     end
 
     it 'returns 400 if branch already exists' do
-      post api(route, user), branch: 'new_design1', ref: branch_sha
+      post api(route, user), params: { branch: 'new_design1', ref: branch_sha }
 
       expect(response).to have_gitlab_http_status(201)
 
-      post api(route, user), branch: 'new_design1', ref: branch_sha
+      post api(route, user), params: { branch: 'new_design1', ref: branch_sha }
 
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['message']).to eq('Branch already exists')
     end
 
     it 'returns 400 if ref name is invalid' do
-      post api(route, user), branch: 'new_design3', ref: 'foo'
+      post api(route, user), params: { branch: 'new_design3', ref: 'foo' }
 
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['message']).to eq('Invalid reference name')
diff --git a/spec/requests/api/broadcast_messages_spec.rb b/spec/requests/api/broadcast_messages_spec.rb
index fe8a14fae9e763818ec8cd217b53860734ffc112..0b48b79219c9dc545f9cd2b962565581f6a1dc11 100644
--- a/spec/requests/api/broadcast_messages_spec.rb
+++ b/spec/requests/api/broadcast_messages_spec.rb
@@ -56,13 +56,13 @@
 
   describe 'POST /broadcast_messages' do
     it 'returns a 401 for anonymous users' do
-      post api('/broadcast_messages'), attributes_for(:broadcast_message)
+      post api('/broadcast_messages'), params: attributes_for(:broadcast_message)
 
       expect(response).to have_gitlab_http_status(401)
     end
 
     it 'returns a 403 for users' do
-      post api('/broadcast_messages', user), attributes_for(:broadcast_message)
+      post api('/broadcast_messages', user), params: attributes_for(:broadcast_message)
 
       expect(response).to have_gitlab_http_status(403)
     end
@@ -72,7 +72,7 @@
         attrs = attributes_for(:broadcast_message)
         attrs.delete(:message)
 
-        post api('/broadcast_messages', admin), attrs
+        post api('/broadcast_messages', admin), params: attrs
 
         expect(response).to have_gitlab_http_status(400)
         expect(json_response['error']).to eq 'message is missing'
@@ -81,7 +81,7 @@
       it 'defines sane default start and end times' do
         time = Time.zone.parse('2016-07-02 10:11:12')
         travel_to(time) do
-          post api('/broadcast_messages', admin), message: 'Test message'
+          post api('/broadcast_messages', admin), params: { message: 'Test message' }
 
           expect(response).to have_gitlab_http_status(201)
           expect(json_response['starts_at']).to eq '2016-07-02T10:11:12.000Z'
@@ -92,7 +92,7 @@
       it 'accepts a custom background and foreground color' do
         attrs = attributes_for(:broadcast_message, color: '#000000', font: '#cecece')
 
-        post api('/broadcast_messages', admin), attrs
+        post api('/broadcast_messages', admin), params: attrs
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['color']).to eq attrs[:color]
@@ -104,14 +104,14 @@
   describe 'PUT /broadcast_messages/:id' do
     it 'returns a 401 for anonymous users' do
       put api("/broadcast_messages/#{message.id}"),
-        attributes_for(:broadcast_message)
+        params: attributes_for(:broadcast_message)
 
       expect(response).to have_gitlab_http_status(401)
     end
 
     it 'returns a 403 for users' do
       put api("/broadcast_messages/#{message.id}", user),
-        attributes_for(:broadcast_message)
+        params: attributes_for(:broadcast_message)
 
       expect(response).to have_gitlab_http_status(403)
     end
@@ -120,7 +120,7 @@
       it 'accepts new background and foreground colors' do
         attrs = { color: '#000000', font: '#cecece' }
 
-        put api("/broadcast_messages/#{message.id}", admin), attrs
+        put api("/broadcast_messages/#{message.id}", admin), params: attrs
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['color']).to eq attrs[:color]
@@ -132,7 +132,7 @@
         travel_to(time) do
           attrs = { starts_at: Time.zone.now, ends_at: 3.hours.from_now }
 
-          put api("/broadcast_messages/#{message.id}", admin), attrs
+          put api("/broadcast_messages/#{message.id}", admin), params: attrs
 
           expect(response).to have_gitlab_http_status(200)
           expect(json_response['starts_at']).to eq '2016-07-02T10:11:12.000Z'
@@ -143,7 +143,7 @@
       it 'accepts a new message' do
         attrs = { message: 'new message' }
 
-        put api("/broadcast_messages/#{message.id}", admin), attrs
+        put api("/broadcast_messages/#{message.id}", admin), params: attrs
 
         expect(response).to have_gitlab_http_status(200)
         expect { message.reload }.to change { message.message }.to('new message')
@@ -154,14 +154,14 @@
   describe 'DELETE /broadcast_messages/:id' do
     it 'returns a 401 for anonymous users' do
       delete api("/broadcast_messages/#{message.id}"),
-        attributes_for(:broadcast_message)
+        params: attributes_for(:broadcast_message)
 
       expect(response).to have_gitlab_http_status(401)
     end
 
     it 'returns a 403 for users' do
       delete api("/broadcast_messages/#{message.id}", user),
-        attributes_for(:broadcast_message)
+        params: attributes_for(:broadcast_message)
 
       expect(response).to have_gitlab_http_status(403)
     end
diff --git a/spec/requests/api/commit_statuses_spec.rb b/spec/requests/api/commit_statuses_spec.rb
index a43304c9b836bfdfeb87bf83a93cd1b62fd0eb03..9388343c392c9db73736bfaacdb5e4f5fad82147 100644
--- a/spec/requests/api/commit_statuses_spec.rb
+++ b/spec/requests/api/commit_statuses_spec.rb
@@ -51,7 +51,7 @@ def create_status(commit, opts = {})
 
         context 'all commit statuses' do
           before do
-            get api(get_url, reporter), all: 1
+            get api(get_url, reporter), params: { all: 1 }
           end
 
           it 'returns all commit statuses' do
@@ -66,7 +66,7 @@ def create_status(commit, opts = {})
 
         context 'latest commit statuses for specific ref' do
           before do
-            get api(get_url, reporter), ref: 'develop'
+            get api(get_url, reporter), params: { ref: 'develop' }
           end
 
           it 'returns latest commit statuses for specific ref' do
@@ -79,7 +79,7 @@ def create_status(commit, opts = {})
 
         context 'latest commit statues for specific name' do
           before do
-            get api(get_url, reporter), name: 'coverage'
+            get api(get_url, reporter), params: { name: 'coverage' }
           end
 
           it 'return latest commit statuses for specific name' do
@@ -133,7 +133,7 @@ def create_status(commit, opts = {})
         context "for #{status}" do
           context 'uses only required parameters' do
             it 'creates commit status' do
-              post api(post_url, developer), state: status
+              post api(post_url, developer), params: { state: status }
 
               expect(response).to have_gitlab_http_status(201)
               expect(json_response['sha']).to eq(commit.id)
@@ -153,12 +153,12 @@ def create_status(commit, opts = {})
 
       context 'transitions status from pending' do
         before do
-          post api(post_url, developer), state: 'pending'
+          post api(post_url, developer), params: { state: 'pending' }
         end
 
         %w[running success failed canceled].each do |status|
           it "to #{status}" do
-            expect { post api(post_url, developer), state: status }.not_to change { CommitStatus.count }
+            expect { post api(post_url, developer), params: { state: status } }.not_to change { CommitStatus.count }
 
             expect(response).to have_gitlab_http_status(201)
             expect(json_response['status']).to eq(status)
@@ -169,7 +169,7 @@ def create_status(commit, opts = {})
       context 'with all optional parameters' do
         context 'when creating a commit status' do
           subject do
-            post api(post_url, developer), {
+            post api(post_url, developer), params: {
               state: 'success',
               context: 'coverage',
               ref: 'master',
@@ -206,7 +206,7 @@ def create_status(commit, opts = {})
 
         context 'when updatig a commit status' do
           before do
-            post api(post_url, developer), {
+            post api(post_url, developer), params: {
               state: 'running',
               context: 'coverage',
               ref: 'master',
@@ -215,7 +215,7 @@ def create_status(commit, opts = {})
               target_url: 'http://gitlab.com/status'
             }
 
-            post api(post_url, developer), {
+            post api(post_url, developer), params: {
               state: 'success',
               name: 'coverage',
               ref: 'master',
@@ -244,10 +244,10 @@ def create_status(commit, opts = {})
       context 'when retrying a commit status' do
         before do
           post api(post_url, developer),
-            { state: 'failed', name: 'test', ref: 'master' }
+            params: { state: 'failed', name: 'test', ref: 'master' }
 
           post api(post_url, developer),
-            { state: 'success', name: 'test', ref: 'master' }
+            params: { state: 'success', name: 'test', ref: 'master' }
         end
 
         it 'correctly posts a new commit status' do
@@ -265,7 +265,7 @@ def create_status(commit, opts = {})
 
       context 'when status is invalid' do
         before do
-          post api(post_url, developer), state: 'invalid'
+          post api(post_url, developer), params: { state: 'invalid' }
         end
 
         it 'does not create commit status' do
@@ -287,7 +287,7 @@ def create_status(commit, opts = {})
         let(:sha) { 'invalid_sha' }
 
         before do
-          post api(post_url, developer), state: 'running'
+          post api(post_url, developer), params: { state: 'running' }
         end
 
         it 'returns not found error' do
@@ -297,8 +297,10 @@ def create_status(commit, opts = {})
 
       context 'when target URL is an invalid address' do
         before do
-          post api(post_url, developer), state: 'pending',
-                                         target_url: 'invalid url'
+          post api(post_url, developer), params: {
+                                           state: 'pending',
+                                           target_url: 'invalid url'
+                                         }
         end
 
         it 'responds with bad request status and validation errors' do
@@ -311,7 +313,7 @@ def create_status(commit, opts = {})
 
     context 'reporter user' do
       before do
-        post api(post_url, reporter), state: 'running'
+        post api(post_url, reporter), params: { state: 'running' }
       end
 
       it 'does not create commit status' do
@@ -321,7 +323,7 @@ def create_status(commit, opts = {})
 
     context 'guest user' do
       before do
-        post api(post_url, guest), state: 'running'
+        post api(post_url, guest), params: { state: 'running' }
       end
 
       it 'does not create commit status' do
diff --git a/spec/requests/api/commits_spec.rb b/spec/requests/api/commits_spec.rb
index 9e599c2175f3d3e9b8cb579e8b8503efaa7c67af..6b9bc6eda6abd6729c1be1e917004b4eba7a9434 100644
--- a/spec/requests/api/commits_spec.rb
+++ b/spec/requests/api/commits_spec.rb
@@ -281,11 +281,11 @@
       it 'does not increment the usage counters using access token authentication' do
         expect(::Gitlab::WebIdeCommitsCounter).not_to receive(:increment)
 
-        post api(url, user), valid_c_params
+        post api(url, user), params: valid_c_params
       end
 
       it 'a new file in project repo' do
-        post api(url, user), valid_c_params
+        post api(url, user), params: valid_c_params
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['title']).to eq(message)
@@ -294,7 +294,7 @@
       end
 
       it 'a new file with utf8 chars in project repo' do
-        post api(url, user), valid_utf8_c_params
+        post api(url, user), params: valid_utf8_c_params
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['title']).to eq(message)
@@ -303,7 +303,7 @@
       end
 
       it 'returns a 400 bad request if file exists' do
-        post api(url, user), invalid_c_params
+        post api(url, user), params: invalid_c_params
 
         expect(response).to have_gitlab_http_status(400)
       end
@@ -312,7 +312,7 @@
         let(:url) { "/projects/#{CGI.escape(project.full_path)}/repository/commits" }
 
         it 'a new file in project repo' do
-          post api(url, user), valid_c_params
+          post api(url, user), params: valid_c_params
 
           expect(response).to have_gitlab_http_status(201)
         end
@@ -347,14 +347,14 @@
       end
 
       it 'an existing file in project repo' do
-        post api(url, user), valid_d_params
+        post api(url, user), params: valid_d_params
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['title']).to eq(message)
       end
 
       it 'returns a 400 bad request if file does not exist' do
-        post api(url, user), invalid_d_params
+        post api(url, user), params: invalid_d_params
 
         expect(response).to have_gitlab_http_status(400)
       end
@@ -392,14 +392,14 @@
       end
 
       it 'an existing file in project repo' do
-        post api(url, user), valid_m_params
+        post api(url, user), params: valid_m_params
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['title']).to eq(message)
       end
 
       it 'returns a 400 bad request if file does not exist' do
-        post api(url, user), invalid_m_params
+        post api(url, user), params: invalid_m_params
 
         expect(response).to have_gitlab_http_status(400)
       end
@@ -435,14 +435,14 @@
       end
 
       it 'an existing file in project repo' do
-        post api(url, user), valid_u_params
+        post api(url, user), params: valid_u_params
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['title']).to eq(message)
       end
 
       it 'returns a 400 bad request if file does not exist' do
-        post api(url, user), invalid_u_params
+        post api(url, user), params: invalid_u_params
 
         expect(response).to have_gitlab_http_status(400)
       end
@@ -467,7 +467,7 @@
       end
 
       it 'responds with success' do
-        post api(url, user), params
+        post api(url, user), params: params
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['title']).to eq(message)
@@ -477,7 +477,7 @@
         let(:execute_filemode) { false }
 
         it 'responds with success' do
-          post api(url, user), params
+          post api(url, user), params: params
 
           expect(response).to have_gitlab_http_status(201)
           expect(json_response['title']).to eq(message)
@@ -488,7 +488,7 @@
         let(:file_path) { 'foo/bar.baz' }
 
         it "responds with 400" do
-          post api(url, user), params
+          post api(url, user), params: params
 
           expect(response).to have_gitlab_http_status(400)
           expect(json_response['message']).to eq("A file with this name doesn't exist")
@@ -566,28 +566,28 @@
       end
 
       it 'are committed as one in project repo' do
-        post api(url, user), valid_mo_params
+        post api(url, user), params: valid_mo_params
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['title']).to eq(message)
       end
 
       it 'includes the commit stats' do
-        post api(url, user), valid_mo_params
+        post api(url, user), params: valid_mo_params
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response).to include 'stats'
       end
 
       it "doesn't include the commit stats when stats is false" do
-        post api(url, user), valid_mo_params.merge(stats: false)
+        post api(url, user), params: valid_mo_params.merge(stats: false)
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response).not_to include 'stats'
       end
 
       it 'return a 400 bad request if there are any issues' do
-        post api(url, user), invalid_mo_params
+        post api(url, user), params: invalid_mo_params
 
         expect(response).to have_gitlab_http_status(400)
       end
@@ -613,13 +613,13 @@ def push_params(branch_name)
       end
 
       it 'allows pushing to the source branch of the merge request' do
-        post api(url, user), push_params('feature')
+        post api(url, user), params: push_params('feature')
 
         expect(response).to have_gitlab_http_status(:created)
       end
 
       it 'denies pushing to another branch' do
-        post api(url, user), push_params('other-branch')
+        post api(url, user), params: push_params('other-branch')
 
         expect(response).to have_gitlab_http_status(:forbidden)
       end
@@ -651,7 +651,7 @@ def push_params(branch_name)
 
     context 'for a valid commit' do
       it 'returns all refs with no scope' do
-        get api(route, current_user), per_page: 100
+        get api(route, current_user), params: { per_page: 100 }
 
         refs = project.repository.branch_names_contains(commit_id).map {|name| ['branch', name]}
         refs.concat(project.repository.tag_names_contains(commit_id).map {|name| ['tag', name]})
@@ -663,7 +663,7 @@ def push_params(branch_name)
       end
 
       it 'returns all refs' do
-        get api(route, current_user), type: 'all', per_page: 100
+        get api(route, current_user), params: { type: 'all', per_page: 100 }
 
         refs = project.repository.branch_names_contains(commit_id).map {|name| ['branch', name]}
         refs.concat(project.repository.tag_names_contains(commit_id).map {|name| ['tag', name]})
@@ -673,7 +673,7 @@ def push_params(branch_name)
       end
 
       it 'returns the branch refs' do
-        get api(route, current_user), type: 'branch', per_page: 100
+        get api(route, current_user), params: { type: 'branch', per_page: 100 }
 
         refs = project.repository.branch_names_contains(commit_id).map {|name| ['branch', name]}
 
@@ -682,7 +682,7 @@ def push_params(branch_name)
       end
 
       it 'returns the tag refs' do
-        get api(route, current_user), type: 'tag', per_page: 100
+        get api(route, current_user), params: { type: 'tag', per_page: 100 }
 
         refs = project.repository.tag_names_contains(commit_id).map {|name| ['tag', name]}
 
@@ -750,14 +750,14 @@ def push_params(branch_name)
       end
 
       it "is false it does not include stats" do
-        get api(route, user), stats: false
+        get api(route, user), params: { stats: false }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response).not_to include 'stats'
       end
 
       it "is true it includes stats" do
-        get api(route, user), stats: true
+        get api(route, user), params: { stats: true }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response).to include 'stats'
@@ -1063,7 +1063,7 @@ def push_params(branch_name)
     shared_examples_for 'ref cherry-pick' do
       context 'when ref exists' do
         it 'cherry-picks the ref commit' do
-          post api(route, current_user), branch: branch
+          post api(route, current_user), params: { branch: branch }
 
           expect(response).to have_gitlab_http_status(201)
           expect(response).to match_response_schema('public_api/v4/commit/basic')
@@ -1078,7 +1078,7 @@ def push_params(branch_name)
         include_context 'disabled repository'
 
         it_behaves_like '403 response' do
-          let(:request) { post api(route, current_user), branch: 'master' }
+          let(:request) { post api(route, current_user), params: { branch: 'master' } }
         end
       end
     end
@@ -1087,13 +1087,13 @@ def push_params(branch_name)
       let(:project) { create(:project, :public, :repository) }
 
       it_behaves_like '403 response' do
-        let(:request) { post api(route), branch: 'master' }
+        let(:request) { post api(route), params: { branch: 'master' } }
       end
     end
 
     context 'when unauthenticated', 'and project is private' do
       it_behaves_like '404 response' do
-        let(:request) { post api(route), branch: 'master' }
+        let(:request) { post api(route), params: { branch: 'master' } }
         let(:message) { '404 Project Not Found' }
       end
     end
@@ -1107,7 +1107,7 @@ def push_params(branch_name)
         let(:commit_id) { 'unknown' }
 
         it_behaves_like '404 response' do
-          let(:request) { post api(route, current_user), branch: 'master' }
+          let(:request) { post api(route, current_user), params: { branch: 'master' } }
           let(:message) { '404 Commit Not Found' }
         end
       end
@@ -1121,21 +1121,21 @@ def push_params(branch_name)
       context 'when branch is empty' do
         ['', ' '].each do |branch|
           it_behaves_like '400 response' do
-            let(:request) { post api(route, current_user), branch: branch }
+            let(:request) { post api(route, current_user), params: { branch: branch } }
           end
         end
       end
 
       context 'when branch does not exist' do
         it_behaves_like '404 response' do
-          let(:request) { post api(route, current_user), branch: 'foo' }
+          let(:request) { post api(route, current_user), params: { branch: 'foo' } }
           let(:message) { '404 Branch Not Found' }
         end
       end
 
       context 'when commit is already included in the target branch' do
         it_behaves_like '400 response' do
-          let(:request) { post api(route, current_user), branch: 'markdown' }
+          let(:request) { post api(route, current_user), params: { branch: 'markdown' } }
         end
       end
 
@@ -1150,7 +1150,7 @@ def push_params(branch_name)
         let(:commit_id) { branch_with_slash.name }
 
         it_behaves_like '404 response' do
-          let(:request) { post api(route, current_user), branch: 'master' }
+          let(:request) { post api(route, current_user), params: { branch: 'master' } }
         end
       end
 
@@ -1181,7 +1181,7 @@ def push_params(branch_name)
         end
 
         it 'returns 400 if you are not allowed to push to the target branch' do
-          post api(route, current_user), branch: 'feature'
+          post api(route, current_user), params: { branch: 'feature' }
 
           expect(response).to have_gitlab_http_status(:forbidden)
           expect(json_response['message']).to match(/You are not allowed to push into this branch/)
@@ -1195,13 +1195,13 @@ def push_params(branch_name)
       let(:project_id) { forked_project.id }
 
       it 'allows access from a maintainer that to the source branch' do
-        post api(route, user), branch: 'feature'
+        post api(route, user), params: { branch: 'feature' }
 
         expect(response).to have_gitlab_http_status(:created)
       end
 
       it 'denies cherry picking to another branch' do
-        post api(route, user), branch: 'master'
+        post api(route, user), params: { branch: 'master' }
 
         expect(response).to have_gitlab_http_status(:forbidden)
       end
@@ -1217,7 +1217,7 @@ def push_params(branch_name)
     shared_examples_for 'ref revert' do
       context 'when ref exists' do
         it 'reverts the ref commit' do
-          post api(route, current_user), branch: branch
+          post api(route, current_user), params: { branch: branch }
 
           expect(response).to have_gitlab_http_status(201)
           expect(response).to match_response_schema('public_api/v4/commit/basic')
@@ -1233,7 +1233,7 @@ def push_params(branch_name)
         include_context 'disabled repository'
 
         it_behaves_like '403 response' do
-          let(:request) { post api(route, current_user), branch: branch }
+          let(:request) { post api(route, current_user), params: { branch: branch } }
         end
       end
     end
@@ -1242,13 +1242,13 @@ def push_params(branch_name)
       let(:project) { create(:project, :public, :repository) }
 
       it_behaves_like '403 response' do
-        let(:request) { post api(route), branch: branch }
+        let(:request) { post api(route), params: { branch: branch } }
       end
     end
 
     context 'when unauthenticated', 'and project is private' do
       it_behaves_like '404 response' do
-        let(:request) { post api(route), branch: branch }
+        let(:request) { post api(route), params: { branch: branch } }
         let(:message) { '404 Project Not Found' }
       end
     end
@@ -1262,7 +1262,7 @@ def push_params(branch_name)
         let(:commit_id) { 'unknown' }
 
         it_behaves_like '404 response' do
-          let(:request) { post api(route, current_user), branch: branch }
+          let(:request) { post api(route, current_user), params: { branch: branch } }
           let(:message) { '404 Commit Not Found' }
         end
       end
@@ -1276,14 +1276,14 @@ def push_params(branch_name)
       context 'when branch is empty' do
         ['', ' '].each do |branch|
           it_behaves_like '400 response' do
-            let(:request) { post api(route, current_user), branch: branch }
+            let(:request) { post api(route, current_user), params: { branch: branch } }
           end
         end
       end
 
       context 'when branch does not exist' do
         it_behaves_like '404 response' do
-          let(:request) { post api(route, current_user), branch: 'foo' }
+          let(:request) { post api(route, current_user), params: { branch: 'foo' } }
           let(:message) { '404 Branch Not Found' }
         end
       end
@@ -1311,7 +1311,7 @@ def push_params(branch_name)
         end
 
         it 'returns 400 if you are not allowed to push to the target branch' do
-          post api(route, current_user), branch: 'feature'
+          post api(route, current_user), params: { branch: 'feature' }
 
           expect(response).to have_gitlab_http_status(:forbidden)
           expect(json_response['message']).to match(/You are not allowed to push into this branch/)
@@ -1329,7 +1329,7 @@ def push_params(branch_name)
     shared_examples_for 'ref new comment' do
       context 'when ref exists' do
         it 'creates the comment' do
-          post api(route, current_user), note: note
+          post api(route, current_user), params: { note: note }
 
           expect(response).to have_gitlab_http_status(201)
           expect(response).to match_response_schema('public_api/v4/commit_note')
@@ -1344,7 +1344,7 @@ def push_params(branch_name)
         include_context 'disabled repository'
 
         it_behaves_like '403 response' do
-          let(:request) { post api(route, current_user), note: 'My comment' }
+          let(:request) { post api(route, current_user), params: { note: 'My comment' } }
         end
       end
     end
@@ -1353,13 +1353,13 @@ def push_params(branch_name)
       let(:project) { create(:project, :public, :repository) }
 
       it_behaves_like '400 response' do
-        let(:request) { post api(route), note: 'My comment' }
+        let(:request) { post api(route), params: { note: 'My comment' } }
       end
     end
 
     context 'when unauthenticated', 'and project is private' do
       it_behaves_like '404 response' do
-        let(:request) { post api(route), note: 'My comment' }
+        let(:request) { post api(route), params: { note: 'My comment' } }
         let(:message) { '404 Project Not Found' }
       end
     end
@@ -1370,7 +1370,7 @@ def push_params(branch_name)
       it_behaves_like 'ref new comment'
 
       it 'returns the inline comment' do
-        post api(route, current_user), note: 'My comment', path: project.repository.commit.raw_diffs.first.new_path, line: 1, line_type: 'new'
+        post api(route, current_user), params: { note: 'My comment', path: project.repository.commit.raw_diffs.first.new_path, line: 1, line_type: 'new' }
 
         expect(response).to have_gitlab_http_status(201)
         expect(response).to match_response_schema('public_api/v4/commit_note')
@@ -1384,7 +1384,7 @@ def push_params(branch_name)
         let(:commit_id) { 'unknown' }
 
         it_behaves_like '404 response' do
-          let(:request) { post api(route, current_user), note: 'My comment' }
+          let(:request) { post api(route, current_user), params: { note: 'My comment' } }
           let(:message) { '404 Commit Not Found' }
         end
       end
@@ -1405,7 +1405,7 @@ def push_params(branch_name)
         let(:commit_id) { branch_with_slash.name }
 
         it_behaves_like '404 response' do
-          let(:request) { post api(route, current_user), note: 'My comment' }
+          let(:request) { post api(route, current_user), params: { note: 'My comment' } }
         end
       end
 
diff --git a/spec/requests/api/deploy_keys_spec.rb b/spec/requests/api/deploy_keys_spec.rb
index 32fc704a79b62c1e3b86591c9aca370b72bb8803..b93ee148736aa30cdbeadbfd59c1d78ef34ad8a5 100644
--- a/spec/requests/api/deploy_keys_spec.rb
+++ b/spec/requests/api/deploy_keys_spec.rb
@@ -72,14 +72,14 @@
 
   describe 'POST /projects/:id/deploy_keys' do
     it 'does not create an invalid ssh key' do
-      post api("/projects/#{project.id}/deploy_keys", admin), { title: 'invalid key' }
+      post api("/projects/#{project.id}/deploy_keys", admin), params: { title: 'invalid key' }
 
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['error']).to eq('key is missing')
     end
 
     it 'does not create a key without title' do
-      post api("/projects/#{project.id}/deploy_keys", admin), key: 'some key'
+      post api("/projects/#{project.id}/deploy_keys", admin), params: { key: 'some key' }
 
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['error']).to eq('title is missing')
@@ -89,7 +89,7 @@
       key_attrs = attributes_for :another_key
 
       expect do
-        post api("/projects/#{project.id}/deploy_keys", admin), key_attrs
+        post api("/projects/#{project.id}/deploy_keys", admin), params: key_attrs
       end.to change { project.deploy_keys.count }.by(1)
 
       new_key = project.deploy_keys.last
@@ -99,7 +99,7 @@
 
     it 'returns an existing ssh key when attempting to add a duplicate' do
       expect do
-        post api("/projects/#{project.id}/deploy_keys", admin), { key: deploy_key.key, title: deploy_key.title }
+        post api("/projects/#{project.id}/deploy_keys", admin), params: { key: deploy_key.key, title: deploy_key.title }
       end.not_to change { project.deploy_keys.count }
 
       expect(response).to have_gitlab_http_status(201)
@@ -107,7 +107,7 @@
 
     it 'joins an existing ssh key to a new project' do
       expect do
-        post api("/projects/#{project2.id}/deploy_keys", admin), { key: deploy_key.key, title: deploy_key.title }
+        post api("/projects/#{project2.id}/deploy_keys", admin), params: { key: deploy_key.key, title: deploy_key.title }
       end.to change { project2.deploy_keys.count }.by(1)
 
       expect(response).to have_gitlab_http_status(201)
@@ -116,7 +116,7 @@
     it 'accepts can_push parameter' do
       key_attrs = attributes_for(:another_key).merge(can_push: true)
 
-      post api("/projects/#{project.id}/deploy_keys", admin), key_attrs
+      post api("/projects/#{project.id}/deploy_keys", admin), params: key_attrs
 
       expect(response).to have_gitlab_http_status(201)
       expect(json_response['can_push']).to eq(true)
@@ -131,7 +131,7 @@
 
     it 'updates a public deploy key as admin' do
       expect do
-        put api("/projects/#{project.id}/deploy_keys/#{deploy_key.id}", admin), { title: 'new title' }
+        put api("/projects/#{project.id}/deploy_keys/#{deploy_key.id}", admin), params: { title: 'new title' }
       end.not_to change(deploy_key, :title)
 
       expect(response).to have_gitlab_http_status(200)
@@ -139,7 +139,7 @@
 
     it 'does not update a public deploy key as non admin' do
       expect do
-        put api("/projects/#{project.id}/deploy_keys/#{deploy_key.id}", user), { title: 'new title' }
+        put api("/projects/#{project.id}/deploy_keys/#{deploy_key.id}", user), params: { title: 'new title' }
       end.not_to change(deploy_key, :title)
 
       expect(response).to have_gitlab_http_status(404)
@@ -149,7 +149,7 @@
       project_private_deploy_key
 
       expect do
-        put api("/projects/#{project.id}/deploy_keys/#{private_deploy_key.id}", admin), { title: '' }
+        put api("/projects/#{project.id}/deploy_keys/#{private_deploy_key.id}", admin), params: { title: '' }
       end.not_to change(deploy_key, :title)
 
       expect(response).to have_gitlab_http_status(400)
@@ -158,7 +158,7 @@
     it 'updates a private ssh key with correct attributes' do
       project_private_deploy_key
 
-      put api("/projects/#{project.id}/deploy_keys/#{private_deploy_key.id}", admin), { title: 'new title', can_push: true }
+      put api("/projects/#{project.id}/deploy_keys/#{private_deploy_key.id}", admin), params: { title: 'new title', can_push: true }
 
       expect(json_response['id']).to eq(private_deploy_key.id)
       expect(json_response['title']).to eq('new title')
diff --git a/spec/requests/api/doorkeeper_access_spec.rb b/spec/requests/api/doorkeeper_access_spec.rb
index 308134eba72b4c6ad13b84bd8f974ae5daa4188e..d74484c8d2919a6d90c131be9a8a67476382668c 100644
--- a/spec/requests/api/doorkeeper_access_spec.rb
+++ b/spec/requests/api/doorkeeper_access_spec.rb
@@ -7,20 +7,20 @@
 
   describe "unauthenticated" do
     it "returns authentication success" do
-      get api("/user"), access_token: token.token
+      get api("/user"), params: { access_token: token.token }
       expect(response).to have_gitlab_http_status(200)
     end
 
     include_examples 'user login request with unique ip limit' do
       def request
-        get api('/user'), access_token: token.token
+        get api('/user'), params: { access_token: token.token }
       end
     end
   end
 
   describe "when token invalid" do
     it "returns authentication error" do
-      get api("/user"), access_token: "123a"
+      get api("/user"), params: { access_token: "123a" }
       expect(response).to have_gitlab_http_status(401)
     end
   end
@@ -41,7 +41,7 @@ def request
   describe "when user is blocked" do
     it "returns authorization error" do
       user.block
-      get api("/user"), access_token: token.token
+      get api("/user"), params: { access_token: token.token }
 
       expect(response).to have_gitlab_http_status(403)
     end
@@ -50,7 +50,7 @@ def request
   describe "when user is ldap_blocked" do
     it "returns authorization error" do
       user.ldap_block
-      get api("/user"), access_token: token.token
+      get api("/user"), params: { access_token: token.token }
 
       expect(response).to have_gitlab_http_status(403)
     end
diff --git a/spec/requests/api/environments_spec.rb b/spec/requests/api/environments_spec.rb
index f3db0c122a0a403372cd13674498f626d7d6da47..493d3642255bab9f214d8049b082da34c29265b2 100644
--- a/spec/requests/api/environments_spec.rb
+++ b/spec/requests/api/environments_spec.rb
@@ -47,7 +47,7 @@
   describe 'POST /projects/:id/environments' do
     context 'as a member' do
       it 'creates a environment with valid params' do
-        post api("/projects/#{project.id}/environments", user), name: "mepmep"
+        post api("/projects/#{project.id}/environments", user), params: { name: "mepmep" }
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['name']).to eq('mepmep')
@@ -56,19 +56,19 @@
       end
 
       it 'requires name to be passed' do
-        post api("/projects/#{project.id}/environments", user), external_url: 'test.gitlab.com'
+        post api("/projects/#{project.id}/environments", user), params: { external_url: 'test.gitlab.com' }
 
         expect(response).to have_gitlab_http_status(400)
       end
 
       it 'returns a 400 if environment already exists' do
-        post api("/projects/#{project.id}/environments", user), name: environment.name
+        post api("/projects/#{project.id}/environments", user), params: { name: environment.name }
 
         expect(response).to have_gitlab_http_status(400)
       end
 
       it 'returns a 400 if slug is specified' do
-        post api("/projects/#{project.id}/environments", user), name: "foo", slug: "foo"
+        post api("/projects/#{project.id}/environments", user), params: { name: "foo", slug: "foo" }
 
         expect(response).to have_gitlab_http_status(400)
         expect(json_response["error"]).to eq("slug is automatically generated and cannot be changed")
@@ -77,13 +77,13 @@
 
     context 'a non member' do
       it 'rejects the request' do
-        post api("/projects/#{project.id}/environments", non_member), name: 'gitlab.com'
+        post api("/projects/#{project.id}/environments", non_member), params: { name: 'gitlab.com' }
 
         expect(response).to have_gitlab_http_status(404)
       end
 
       it 'returns a 400 when the required params are missing' do
-        post api("/projects/12345/environments", non_member), external_url: 'http://env.git.com'
+        post api("/projects/12345/environments", non_member), params: { external_url: 'http://env.git.com' }
       end
     end
   end
@@ -92,7 +92,7 @@
     it 'returns a 200 if name and external_url are changed' do
       url = 'https://mepmep.whatever.ninja'
       put api("/projects/#{project.id}/environments/#{environment.id}", user),
-          name: 'Mepmep', external_url: url
+          params: { name: 'Mepmep', external_url: url }
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['name']).to eq('Mepmep')
@@ -102,7 +102,7 @@
     it "won't allow slug to be changed" do
       slug = environment.slug
       api_url = api("/projects/#{project.id}/environments/#{environment.id}", user)
-      put api_url, slug: slug + "-foo"
+      put api_url, params: { slug: slug + "-foo" }
 
       expect(response).to have_gitlab_http_status(400)
       expect(json_response["error"]).to eq("slug is automatically generated and cannot be changed")
@@ -111,7 +111,7 @@
     it "won't update the external_url if only the name is passed" do
       url = environment.external_url
       put api("/projects/#{project.id}/environments/#{environment.id}", user),
-          name: 'Mepmep'
+          params: { name: 'Mepmep' }
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['name']).to eq('Mepmep')
diff --git a/spec/requests/api/events_spec.rb b/spec/requests/api/events_spec.rb
index c4e3ac14441adc074dc08cbe12babd991b151234..8c58ba45ce94515dc21205567c4af62e30f7b4e0 100644
--- a/spec/requests/api/events_spec.rb
+++ b/spec/requests/api/events_spec.rb
@@ -279,13 +279,13 @@
 
       it 'avoids N+1 queries' do
         control_count = ActiveRecord::QueryRecorder.new(skip_cached: false) do
-          get api("/projects/#{private_project.id}/events", user), target_type: :merge_request
+          get api("/projects/#{private_project.id}/events", user), params: { target_type: :merge_request }
         end.count
 
         create_event(merge_request2)
 
         expect do
-          get api("/projects/#{private_project.id}/events", user), target_type: :merge_request
+          get api("/projects/#{private_project.id}/events", user), params: { target_type: :merge_request }
         end.not_to exceed_all_query_limit(control_count)
 
         expect(response).to have_gitlab_http_status(200)
diff --git a/spec/requests/api/features_spec.rb b/spec/requests/api/features_spec.rb
index c5354c2d639d38314030f3e063e5ca1f77391a01..7d3eff7d32dd310972378193207ba160ad860aa4 100644
--- a/spec/requests/api/features_spec.rb
+++ b/spec/requests/api/features_spec.rb
@@ -79,7 +79,7 @@
 
       context 'when passed value=true' do
         it 'creates an enabled feature' do
-          post api("/features/#{feature_name}", admin), value: 'true'
+          post api("/features/#{feature_name}", admin), params: { value: 'true' }
 
           expect(response).to have_gitlab_http_status(201)
           expect(json_response).to eq(
@@ -89,7 +89,7 @@
         end
 
         it 'creates an enabled feature for the given Flipper group when passed feature_group=perf_team' do
-          post api("/features/#{feature_name}", admin), value: 'true', feature_group: 'perf_team'
+          post api("/features/#{feature_name}", admin), params: { value: 'true', feature_group: 'perf_team' }
 
           expect(response).to have_gitlab_http_status(201)
           expect(json_response).to eq(
@@ -102,7 +102,7 @@
         end
 
         it 'creates an enabled feature for the given user when passed user=username' do
-          post api("/features/#{feature_name}", admin), value: 'true', user: user.username
+          post api("/features/#{feature_name}", admin), params: { value: 'true', user: user.username }
 
           expect(response).to have_gitlab_http_status(201)
           expect(json_response).to eq(
@@ -115,7 +115,7 @@
         end
 
         it 'creates an enabled feature for the given user and feature group when passed user=username and feature_group=perf_team' do
-          post api("/features/#{feature_name}", admin), value: 'true', user: user.username, feature_group: 'perf_team'
+          post api("/features/#{feature_name}", admin), params: { value: 'true', user: user.username, feature_group: 'perf_team' }
 
           expect(response).to have_gitlab_http_status(201)
           expect(json_response).to eq(
@@ -130,7 +130,7 @@
       end
 
       it 'creates a feature with the given percentage if passed an integer' do
-        post api("/features/#{feature_name}", admin), value: '50'
+        post api("/features/#{feature_name}", admin), params: { value: '50' }
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response).to eq(
@@ -152,7 +152,7 @@
 
       context 'when passed value=true' do
         it 'enables the feature' do
-          post api("/features/#{feature_name}", admin), value: 'true'
+          post api("/features/#{feature_name}", admin), params: { value: 'true' }
 
           expect(response).to have_gitlab_http_status(201)
           expect(json_response).to eq(
@@ -162,7 +162,7 @@
         end
 
         it 'enables the feature for the given Flipper group when passed feature_group=perf_team' do
-          post api("/features/#{feature_name}", admin), value: 'true', feature_group: 'perf_team'
+          post api("/features/#{feature_name}", admin), params: { value: 'true', feature_group: 'perf_team' }
 
           expect(response).to have_gitlab_http_status(201)
           expect(json_response).to eq(
@@ -175,7 +175,7 @@
         end
 
         it 'enables the feature for the given user when passed user=username' do
-          post api("/features/#{feature_name}", admin), value: 'true', user: user.username
+          post api("/features/#{feature_name}", admin), params: { value: 'true', user: user.username }
 
           expect(response).to have_gitlab_http_status(201)
           expect(json_response).to eq(
@@ -193,7 +193,7 @@
           feature.enable
           expect(feature).to be_enabled
 
-          post api("/features/#{feature_name}", admin), value: 'false'
+          post api("/features/#{feature_name}", admin), params: { value: 'false' }
 
           expect(response).to have_gitlab_http_status(201)
           expect(json_response).to eq(
@@ -206,7 +206,7 @@
           feature.enable(Feature.group(:perf_team))
           expect(Feature.get(feature_name).enabled?(admin)).to be_truthy
 
-          post api("/features/#{feature_name}", admin), value: 'false', feature_group: 'perf_team'
+          post api("/features/#{feature_name}", admin), params: { value: 'false', feature_group: 'perf_team' }
 
           expect(response).to have_gitlab_http_status(201)
           expect(json_response).to eq(
@@ -219,7 +219,7 @@
           feature.enable(user)
           expect(Feature.get(feature_name).enabled?(user)).to be_truthy
 
-          post api("/features/#{feature_name}", admin), value: 'false', user: user.username
+          post api("/features/#{feature_name}", admin), params: { value: 'false', user: user.username }
 
           expect(response).to have_gitlab_http_status(201)
           expect(json_response).to eq(
@@ -235,7 +235,7 @@
         end
 
         it 'updates the percentage of time if passed an integer' do
-          post api("/features/#{feature_name}", admin), value: '30'
+          post api("/features/#{feature_name}", admin), params: { value: '30' }
 
           expect(response).to have_gitlab_http_status(201)
           expect(json_response).to eq(
diff --git a/spec/requests/api/files_spec.rb b/spec/requests/api/files_spec.rb
index 620f9f5e1d6b8461fc6933f1a43b5d06d1a4082e..e6d82448c0d32d57ef1f631a811396c59ddf6fd9 100644
--- a/spec/requests/api/files_spec.rb
+++ b/spec/requests/api/files_spec.rb
@@ -144,7 +144,7 @@ def route(file_path = nil)
   describe "GET /projects/:id/repository/files/:file_path" do
     shared_examples_for 'repository files' do
       it 'returns file attributes as json' do
-        get api(route(file_path), current_user), params
+        get api(route(file_path), current_user), params: params
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['file_path']).to eq(CGI.unescape(file_path))
@@ -157,7 +157,7 @@ def route(file_path = nil)
       it 'returns json when file has txt extension' do
         file_path = "bar%2Fbranch-test.txt"
 
-        get api(route(file_path), current_user), params
+        get api(route(file_path), current_user), params: params
 
         expect(response).to have_gitlab_http_status(200)
         expect(response.content_type).to eq('application/json')
@@ -168,7 +168,7 @@ def route(file_path = nil)
         file_path = "files%2Fjs%2Fcommit%2Ejs%2Ecoffee"
         params[:ref] = "6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9"
 
-        get api(route(file_path), current_user), params
+        get api(route(file_path), current_user), params: params
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['file_name']).to eq('commit.js.coffee')
@@ -180,7 +180,7 @@ def route(file_path = nil)
         url = route(file_path) + "/raw"
         expect(Gitlab::Workhorse).to receive(:send_git_blob)
 
-        get api(url, current_user), params
+        get api(url, current_user), params: params
 
         expect(response).to have_gitlab_http_status(200)
       end
@@ -188,7 +188,7 @@ def route(file_path = nil)
       it 'forces attachment content disposition' do
         url = route(file_path) + "/raw"
 
-        get api(url, current_user), params
+        get api(url, current_user), params: params
 
         expect(headers['Content-Disposition']).to match(/^attachment/)
       end
@@ -203,7 +203,7 @@ def route(file_path = nil)
         let(:params) { { ref: 'master' } }
 
         it_behaves_like '404 response' do
-          let(:request) { get api(route('app%2Fmodels%2Fapplication%2Erb'), current_user), params }
+          let(:request) { get api(route('app%2Fmodels%2Fapplication%2Erb'), current_user), params: params }
           let(:message) { '404 File Not Found' }
         end
       end
@@ -212,7 +212,7 @@ def route(file_path = nil)
         include_context 'disabled repository'
 
         it_behaves_like '403 response' do
-          let(:request) { get api(route(file_path), current_user), params }
+          let(:request) { get api(route(file_path), current_user), params: params }
         end
       end
     end
@@ -233,7 +233,7 @@ def route(file_path = nil)
 
     context 'when unauthenticated', 'and project is private' do
       it_behaves_like '404 response' do
-        let(:request) { get api(route(file_path)), params }
+        let(:request) { get api(route(file_path)), params: params }
         let(:message) { '404 Project Not Found' }
       end
     end
@@ -246,7 +246,7 @@ def route(file_path = nil)
 
     context 'when authenticated', 'as a guest' do
       it_behaves_like '403 response' do
-        let(:request) { get api(route(file_path), guest), params }
+        let(:request) { get api(route(file_path), guest), params: params }
       end
     end
   end
@@ -257,7 +257,7 @@ def route(file_path = nil)
         url = route(file_path) + "/raw"
         expect(Gitlab::Workhorse).to receive(:send_git_blob)
 
-        get api(url, current_user), params
+        get api(url, current_user), params: params
 
         expect(response).to have_gitlab_http_status(200)
       end
@@ -266,7 +266,7 @@ def route(file_path = nil)
         url = route('.gitignore') + "/raw"
         expect(Gitlab::Workhorse).to receive(:send_git_blob)
 
-        get api(url, current_user), params
+        get api(url, current_user), params: params
 
         expect(response).to have_gitlab_http_status(200)
       end
@@ -277,7 +277,7 @@ def route(file_path = nil)
         params[:ref] = "6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9"
         expect(Gitlab::Workhorse).to receive(:send_git_blob)
 
-        get api(route(file_path) + "/raw", current_user), params
+        get api(route(file_path) + "/raw", current_user), params: params
 
         expect(response).to have_gitlab_http_status(200)
       end
@@ -292,7 +292,7 @@ def route(file_path = nil)
         let(:params) { { ref: 'master' } }
 
         it_behaves_like '404 response' do
-          let(:request) { get api(route('app%2Fmodels%2Fapplication%2Erb'), current_user), params }
+          let(:request) { get api(route('app%2Fmodels%2Fapplication%2Erb'), current_user), params: params }
           let(:message) { '404 File Not Found' }
         end
       end
@@ -301,7 +301,7 @@ def route(file_path = nil)
         include_context 'disabled repository'
 
         it_behaves_like '403 response' do
-          let(:request) { get api(route(file_path), current_user), params }
+          let(:request) { get api(route(file_path), current_user), params: params }
         end
       end
     end
@@ -315,7 +315,7 @@ def route(file_path = nil)
 
     context 'when unauthenticated', 'and project is private' do
       it_behaves_like '404 response' do
-        let(:request) { get api(route(file_path)), params }
+        let(:request) { get api(route(file_path)), params: params }
         let(:message) { '404 Project Not Found' }
       end
     end
@@ -328,7 +328,7 @@ def route(file_path = nil)
 
     context 'when authenticated', 'as a guest' do
       it_behaves_like '403 response' do
-        let(:request) { get api(route(file_path), guest), params }
+        let(:request) { get api(route(file_path), guest), params: params }
       end
     end
 
@@ -341,7 +341,7 @@ def route(file_path = nil)
         params[:ref] = "6f6d7e7ed97bb5f0054f2b1df789b39ca89b6ff9"
         expect(Gitlab::Workhorse).to receive(:send_git_blob)
 
-        get api(route(file_path) + "/raw", personal_access_token: token), params
+        get api(route(file_path) + "/raw", personal_access_token: token), params: params
 
         expect(response).to have_gitlab_http_status(200)
       end
@@ -359,7 +359,7 @@ def route(file_path = nil)
     end
 
     it "creates a new file in project repo" do
-      post api(route(file_path), user), params
+      post api(route(file_path), user), params: params
 
       expect(response).to have_gitlab_http_status(201)
       expect(json_response["file_path"]).to eq(CGI.unescape(file_path))
@@ -377,7 +377,7 @@ def route(file_path = nil)
     it 'returns a 400 bad request if the commit message is empty' do
       params[:commit_message] = ''
 
-      post api(route(file_path), user), params
+      post api(route(file_path), user), params: params
 
       expect(response).to have_gitlab_http_status(400)
     end
@@ -386,7 +386,7 @@ def route(file_path = nil)
       allow_any_instance_of(Repository).to receive(:create_file)
         .and_raise(Gitlab::Git::CommitError, 'Cannot create file')
 
-      post api(route("any%2Etxt"), user), params
+      post api(route("any%2Etxt"), user), params: params
 
       expect(response).to have_gitlab_http_status(400)
     end
@@ -395,7 +395,7 @@ def route(file_path = nil)
       it 'returns 403 with `read_repository` scope' do
         token = create(:personal_access_token, scopes: ['read_repository'], user: user)
 
-        post api(route(file_path), personal_access_token: token), params
+        post api(route(file_path), personal_access_token: token), params: params
 
         expect(response).to have_gitlab_http_status(403)
       end
@@ -403,7 +403,7 @@ def route(file_path = nil)
       it 'returns 201 with `api` scope' do
         token = create(:personal_access_token, scopes: ['api'], user: user)
 
-        post api(route(file_path), personal_access_token: token), params
+        post api(route(file_path), personal_access_token: token), params: params
 
         expect(response).to have_gitlab_http_status(201)
       end
@@ -413,7 +413,7 @@ def route(file_path = nil)
       it "creates a new file with the specified author" do
         params.merge!(author_email: author_email, author_name: author_name)
 
-        post api(route("new_file_with_author%2Etxt"), user), params
+        post api(route("new_file_with_author%2Etxt"), user), params: params
 
         expect(response).to have_gitlab_http_status(201)
         expect(response.content_type).to eq('application/json')
@@ -427,7 +427,7 @@ def route(file_path = nil)
       let!(:project) { create(:project_empty_repo, namespace: user.namespace ) }
 
       it "creates a new file in project repo" do
-        post api(route("newfile%2Erb"), user), params
+        post api(route("newfile%2Erb"), user), params: params
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['file_path']).to eq('newfile.rb')
@@ -448,7 +448,7 @@ def route(file_path = nil)
     end
 
     it "updates existing file in project repo" do
-      put api(route(file_path), user), params
+      put api(route(file_path), user), params: params
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['file_path']).to eq(CGI.unescape(file_path))
@@ -460,7 +460,7 @@ def route(file_path = nil)
     it 'returns a 400 bad request if the commit message is empty' do
       params[:commit_message] = ''
 
-      put api(route(file_path), user), params
+      put api(route(file_path), user), params: params
 
       expect(response).to have_gitlab_http_status(400)
     end
@@ -468,7 +468,7 @@ def route(file_path = nil)
     it "returns a 400 bad request if update existing file with stale last commit id" do
       params_with_stale_id = params.merge(last_commit_id: 'stale')
 
-      put api(route(file_path), user), params_with_stale_id
+      put api(route(file_path), user), params: params_with_stale_id
 
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['message']).to eq('You are attempting to update a file that has changed since you started editing it.')
@@ -479,7 +479,7 @@ def route(file_path = nil)
                         .last_for_path(project.repository, 'master', URI.unescape(file_path))
       params_with_correct_id = params.merge(last_commit_id: last_commit.id)
 
-      put api(route(file_path), user), params_with_correct_id
+      put api(route(file_path), user), params: params_with_correct_id
 
       expect(response).to have_gitlab_http_status(200)
     end
@@ -494,7 +494,7 @@ def route(file_path = nil)
       it "updates a file with the specified author" do
         params.merge!(author_email: author_email, author_name: author_name, content: "New content")
 
-        put api(route(file_path), user), params
+        put api(route(file_path), user), params: params
 
         expect(response).to have_gitlab_http_status(200)
         last_commit = project.repository.commit.raw
@@ -513,7 +513,7 @@ def route(file_path = nil)
     end
 
     it "deletes existing file in project repo" do
-      delete api(route(file_path), user), params
+      delete api(route(file_path), user), params: params
 
       expect(response).to have_gitlab_http_status(204)
     end
@@ -527,7 +527,7 @@ def route(file_path = nil)
     it 'returns a 400 bad request if the commit message is empty' do
       params[:commit_message] = ''
 
-      delete api(route(file_path), user), params
+      delete api(route(file_path), user), params: params
 
       expect(response).to have_gitlab_http_status(400)
     end
@@ -535,7 +535,7 @@ def route(file_path = nil)
     it "returns a 400 if fails to delete file" do
       allow_any_instance_of(Repository).to receive(:delete_file).and_raise(Gitlab::Git::CommitError, 'Cannot delete file')
 
-      delete api(route(file_path), user), params
+      delete api(route(file_path), user), params: params
 
       expect(response).to have_gitlab_http_status(400)
     end
@@ -544,7 +544,7 @@ def route(file_path = nil)
       it "removes a file with the specified author" do
         params.merge!(author_email: author_email, author_name: author_name)
 
-        delete api(route(file_path), user), params
+        delete api(route(file_path), user), params: params
 
         expect(response).to have_gitlab_http_status(204)
       end
@@ -568,11 +568,11 @@ def route(file_path = nil)
     end
 
     before do
-      post api(route(file_path), user), put_params
+      post api(route(file_path), user), params: put_params
     end
 
     it "remains unchanged" do
-      get api(route(file_path), user), get_params
+      get api(route(file_path), user), params: get_params
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['file_path']).to eq(CGI.unescape(file_path))
diff --git a/spec/requests/api/group_boards_spec.rb b/spec/requests/api/group_boards_spec.rb
index 894c94688ba4a56a854cb4569d89d97d70ed8125..b400a7f55ef9da5efd1564d45745df6a3239848a 100644
--- a/spec/requests/api/group_boards_spec.rb
+++ b/spec/requests/api/group_boards_spec.rb
@@ -46,7 +46,7 @@
     it 'does not create lists for child project labels' do
       project_label = create(:label, project: project)
 
-      post api(url, user), label_id: project_label.id
+      post api(url, user), params: { label_id: project_label.id }
 
       expect(response).to have_gitlab_http_status(400)
     end
diff --git a/spec/requests/api/group_variables_spec.rb b/spec/requests/api/group_variables_spec.rb
index f87e035c89d8683cd103158a5578f35f8345d603..e52f4c704073a0b0346bb73b7b2408677c83aae3 100644
--- a/spec/requests/api/group_variables_spec.rb
+++ b/spec/requests/api/group_variables_spec.rb
@@ -87,7 +87,7 @@
 
       it 'creates variable' do
         expect do
-          post api("/groups/#{group.id}/variables", user), key: 'TEST_VARIABLE_2', value: 'VALUE_2', protected: true
+          post api("/groups/#{group.id}/variables", user), params: { key: 'TEST_VARIABLE_2', value: 'VALUE_2', protected: true }
         end.to change {group.variables.count}.by(1)
 
         expect(response).to have_gitlab_http_status(201)
@@ -98,7 +98,7 @@
 
       it 'creates variable with optional attributes' do
         expect do
-          post api("/groups/#{group.id}/variables", user), key: 'TEST_VARIABLE_2', value: 'VALUE_2'
+          post api("/groups/#{group.id}/variables", user), params: { key: 'TEST_VARIABLE_2', value: 'VALUE_2' }
         end.to change {group.variables.count}.by(1)
 
         expect(response).to have_gitlab_http_status(201)
@@ -109,7 +109,7 @@
 
       it 'does not allow to duplicate variable key' do
         expect do
-          post api("/groups/#{group.id}/variables", user), key: variable.key, value: 'VALUE_2'
+          post api("/groups/#{group.id}/variables", user), params: { key: variable.key, value: 'VALUE_2' }
         end.to change {group.variables.count}.by(0)
 
         expect(response).to have_gitlab_http_status(400)
@@ -145,7 +145,7 @@
         initial_variable = group.variables.reload.first
         value_before = initial_variable.value
 
-        put api("/groups/#{group.id}/variables/#{variable.key}", user), value: 'VALUE_1_UP', protected: true
+        put api("/groups/#{group.id}/variables/#{variable.key}", user), params: { value: 'VALUE_1_UP', protected: true }
 
         updated_variable = group.variables.reload.first
 
diff --git a/spec/requests/api/groups_spec.rb b/spec/requests/api/groups_spec.rb
index 98c5a65aed96f58833a155f3b9381909e5e0ceec..f9286972ea8385bcfe63059562cf5bf9209801ca 100644
--- a/spec/requests/api/groups_spec.rb
+++ b/spec/requests/api/groups_spec.rb
@@ -74,7 +74,7 @@
       end
 
       it "does not include statistics" do
-        get api("/groups", user1), statistics: true
+        get api("/groups", user1), params: { statistics: true }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to include_pagination_headers
@@ -114,7 +114,7 @@
 
         project1.statistics.update!(attributes)
 
-        get api("/groups", admin), statistics: true
+        get api("/groups", admin), params: { statistics: true }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to include_pagination_headers
@@ -126,7 +126,7 @@
 
     context "when using skip_groups in request" do
       it "returns all groups excluding skipped groups" do
-        get api("/groups", admin), skip_groups: [group2.id]
+        get api("/groups", admin), params: { skip_groups: [group2.id] }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to include_pagination_headers
@@ -141,7 +141,7 @@
       it "returns all groups you have access to" do
         public_group = create :group, :public
 
-        get api("/groups", user1), all_available: true
+        get api("/groups", user1), params: { all_available: true }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to include_pagination_headers
@@ -173,7 +173,7 @@
       end
 
       it "sorts in descending order when passed" do
-        get api("/groups", user1), sort: "desc"
+        get api("/groups", user1), params: { sort: "desc" }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to include_pagination_headers
@@ -182,7 +182,7 @@
       end
 
       it "sorts by path in order_by param" do
-        get api("/groups", user1), order_by: "path"
+        get api("/groups", user1), params: { order_by: "path" }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to include_pagination_headers
@@ -191,7 +191,7 @@
       end
 
       it "sorts by id in the order_by param" do
-        get api("/groups", user1), order_by: "id"
+        get api("/groups", user1), params: { order_by: "id" }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to include_pagination_headers
@@ -200,7 +200,7 @@
       end
 
       it "sorts also by descending id with pagination fix" do
-        get api("/groups", user1), order_by: "id", sort: "desc"
+        get api("/groups", user1), params: { order_by: "id", sort: "desc" }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to include_pagination_headers
@@ -209,7 +209,7 @@
       end
 
       it "sorts identical keys by id for good pagination" do
-        get api("/groups", user1), search: "same-name", order_by: "name"
+        get api("/groups", user1), params: { search: "same-name", order_by: "name" }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to include_pagination_headers
@@ -218,7 +218,7 @@
       end
 
       it "sorts descending identical keys by id for good pagination" do
-        get api("/groups", user1), search: "same-name", order_by: "name", sort: "desc"
+        get api("/groups", user1), params: { search: "same-name", order_by: "name", sort: "desc" }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to include_pagination_headers
@@ -235,7 +235,7 @@ def groups_visible_to_user(user)
       it 'returns an array of groups the user owns' do
         group1.add_maintainer(user2)
 
-        get api('/groups', user2), owned: true
+        get api('/groups', user2), params: { owned: true }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to include_pagination_headers
@@ -255,7 +255,7 @@ def groups_visible_to_user(user)
       end
 
       it 'returns an array of groups the user has at least master access' do
-        get api('/groups', user2), min_access_level: 40
+        get api('/groups', user2), params: { min_access_level: 40 }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to include_pagination_headers
@@ -358,7 +358,7 @@ def response_project_ids(json_response, key)
         project = create(:project, namespace: group2, path: 'Foo')
         create(:project_group_link, project: project, group: group1)
 
-        get api("/groups/#{group1.id}", user1), with_projects: false
+        get api("/groups/#{group1.id}", user1), params: { with_projects: false }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['projects']).to be_nil
@@ -440,7 +440,7 @@ def response_project_ids(json_response, key)
 
     context 'when authenticated as the group owner' do
       it 'updates the group' do
-        put api("/groups/#{group1.id}", user1), name: new_group_name, request_access_enabled: true
+        put api("/groups/#{group1.id}", user1), params: { name: new_group_name, request_access_enabled: true }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['name']).to eq(new_group_name)
@@ -448,7 +448,7 @@ def response_project_ids(json_response, key)
       end
 
       it 'returns 404 for a non existing group' do
-        put api('/groups/1328', user1), name: new_group_name
+        put api('/groups/1328', user1), params: { name: new_group_name }
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -475,7 +475,7 @@ def response_project_ids(json_response, key)
 
     context 'when authenticated as the admin' do
       it 'updates the group' do
-        put api("/groups/#{group1.id}", admin), name: new_group_name
+        put api("/groups/#{group1.id}", admin), params: { name: new_group_name }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['name']).to eq(new_group_name)
@@ -495,7 +495,7 @@ def response_project_ids(json_response, key)
 
     context 'when authenticated as an user that can see the group' do
       it 'does not updates the group' do
-        put api("/groups/#{group1.id}", user2), name: new_group_name
+        put api("/groups/#{group1.id}", user2), params: { name: new_group_name }
 
         expect(response).to have_gitlab_http_status(403)
       end
@@ -503,7 +503,7 @@ def response_project_ids(json_response, key)
 
     context 'when authenticated as an user that cannot see the group' do
       it 'returns 404 when trying to update the group' do
-        put api("/groups/#{group2.id}", user1), name: new_group_name
+        put api("/groups/#{group2.id}", user1), params: { name: new_group_name }
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -524,7 +524,7 @@ def response_project_ids(json_response, key)
       end
 
       it "returns the group's projects with simple representation" do
-        get api("/groups/#{group1.id}/projects", user1), simple: true
+        get api("/groups/#{group1.id}/projects", user1), params: { simple: true }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to include_pagination_headers
@@ -537,7 +537,7 @@ def response_project_ids(json_response, key)
       it "filters the groups projects" do
         public_project = create(:project, :public, path: 'test1', group: group1)
 
-        get api("/groups/#{group1.id}/projects", user1), visibility: 'public'
+        get api("/groups/#{group1.id}/projects", user1), params: { visibility: 'public' }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to include_pagination_headers
@@ -551,7 +551,7 @@ def response_project_ids(json_response, key)
         create(:project_group_link, project: create(:project), group: group1)
         create(:project_group_link, project: create(:project), group: group1)
 
-        get api("/groups/#{group1.id}/projects", user1), with_shared: false
+        get api("/groups/#{group1.id}/projects", user1), params: { with_shared: false }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to include_pagination_headers
@@ -564,7 +564,7 @@ def response_project_ids(json_response, key)
         create(:project, group: subgroup)
         create(:project, group: subgroup)
 
-        get api("/groups/#{group1.id}/projects", user1), include_subgroups: true
+        get api("/groups/#{group1.id}/projects", user1), params: { include_subgroups: true }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to include_pagination_headers
@@ -598,7 +598,7 @@ def response_project_ids(json_response, key)
       it 'only returns the projects owned by user' do
         project2.group.add_owner(user3)
 
-        get api("/groups/#{project2.group.id}/projects", user3), owned: true
+        get api("/groups/#{project2.group.id}/projects", user3), params: { owned: true }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response.length).to eq(1)
@@ -608,7 +608,7 @@ def response_project_ids(json_response, key)
       it 'only returns the projects starred by user' do
         user1.starred_projects = [project1]
 
-        get api("/groups/#{group1.id}/projects", user1), starred: true
+        get api("/groups/#{group1.id}/projects", user1), params: { starred: true }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response.length).to eq(1)
@@ -707,7 +707,7 @@ def response_project_ids(json_response, key)
 
         context 'when using all_available in request' do
           it 'returns public subgroups' do
-            get api("/groups/#{group1.id}/subgroups", user2), all_available: true
+            get api("/groups/#{group1.id}/subgroups", user2), params: { all_available: true }
 
             expect(response).to have_gitlab_http_status(200)
             expect(json_response).to be_an Array
@@ -746,7 +746,7 @@ def response_project_ids(json_response, key)
 
         context 'when using statistics in request' do
           it 'does not include statistics' do
-            get api("/groups/#{group1.id}/subgroups", user2), statistics: true
+            get api("/groups/#{group1.id}/subgroups", user2), params: { statistics: true }
 
             expect(response).to have_gitlab_http_status(200)
             expect(json_response).to be_an Array
@@ -798,7 +798,7 @@ def response_project_ids(json_response, key)
       end
 
       it 'includes statistics if requested' do
-        get api("/groups/#{group1.id}/subgroups", admin), statistics: true
+        get api("/groups/#{group1.id}/subgroups", admin), params: { statistics: true }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response).to be_an Array
@@ -810,7 +810,7 @@ def response_project_ids(json_response, key)
   describe "POST /groups" do
     context "when authenticated as user without group permissions" do
       it "does not create group" do
-        post api("/groups", user1), attributes_for(:group)
+        post api("/groups", user1), params: attributes_for(:group)
 
         expect(response).to have_gitlab_http_status(403)
       end
@@ -821,7 +821,7 @@ def response_project_ids(json_response, key)
         end
 
         it 'can create subgroups' do
-          post api("/groups", user1), parent_id: group2.id, name: 'foo', path: 'foo'
+          post api("/groups", user1), params: { parent_id: group2.id, name: 'foo', path: 'foo' }
 
           expect(response).to have_gitlab_http_status(201)
         end
@@ -833,7 +833,7 @@ def response_project_ids(json_response, key)
         end
 
         it 'cannot create subgroups' do
-          post api("/groups", user1), parent_id: group2.id, name: 'foo', path: 'foo'
+          post api("/groups", user1), params: { parent_id: group2.id, name: 'foo', path: 'foo' }
 
           expect(response).to have_gitlab_http_status(403)
         end
@@ -844,7 +844,7 @@ def response_project_ids(json_response, key)
       it "creates group" do
         group = attributes_for(:group, { request_access_enabled: false })
 
-        post api("/groups", user3), group
+        post api("/groups", user3), params: group
 
         expect(response).to have_gitlab_http_status(201)
 
@@ -859,7 +859,7 @@ def response_project_ids(json_response, key)
         parent.add_owner(user3)
         group = attributes_for(:group, { parent_id: parent.id })
 
-        post api("/groups", user3), group
+        post api("/groups", user3), params: group
 
         expect(response).to have_gitlab_http_status(201)
 
@@ -868,20 +868,20 @@ def response_project_ids(json_response, key)
       end
 
       it "does not create group, duplicate" do
-        post api("/groups", user3), { name: 'Duplicate Test', path: group2.path }
+        post api("/groups", user3), params: { name: 'Duplicate Test', path: group2.path }
 
         expect(response).to have_gitlab_http_status(400)
         expect(response.message).to eq("Bad Request")
       end
 
       it "returns 400 bad request error if name not given" do
-        post api("/groups", user3), { path: group2.path }
+        post api("/groups", user3), params: { path: group2.path }
 
         expect(response).to have_gitlab_http_status(400)
       end
 
       it "returns 400 bad request error if path not given" do
-        post api("/groups", user3), { name: 'test' }
+        post api("/groups", user3), params: { name: 'test' }
 
         expect(response).to have_gitlab_http_status(400)
       end
diff --git a/spec/requests/api/helpers_spec.rb b/spec/requests/api/helpers_spec.rb
index 460019ef10f53e593c454b7a16564488c12e87b8..f40c44162c2c136c31e65cb2358f12cdf891173d 100644
--- a/spec/requests/api/helpers_spec.rb
+++ b/spec/requests/api/helpers_spec.rb
@@ -331,7 +331,7 @@ def set_param(key, value)
       it 'sends the params, excluding confidential values' do
         expect(ProjectsFinder).to receive(:new).and_raise('Runtime Error!')
 
-        get api('/projects', user), password: 'dont_send_this', other_param: 'send_this'
+        get api('/projects', user), params: { password: 'dont_send_this', other_param: 'send_this' }
 
         expect(event_data).to include('other_param=send_this')
         expect(event_data).to include('password=********')
diff --git a/spec/requests/api/internal_spec.rb b/spec/requests/api/internal_spec.rb
index 89abdba98cff0a388016d26b4bf5bf97027e5401..589816b5d8fd2d08ea8a6c3007b5fbdfbfbdd618 100644
--- a/spec/requests/api/internal_spec.rb
+++ b/spec/requests/api/internal_spec.rb
@@ -12,7 +12,7 @@
     it do
       expect_any_instance_of(Redis).to receive(:ping).and_return('PONG')
 
-      get api("/internal/check"), secret_token: secret_token
+      get api("/internal/check"), params: { secret_token: secret_token }
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['api_version']).to eq(API::API.version)
@@ -22,7 +22,7 @@
     it 'returns false for field `redis` when redis is unavailable' do
       expect_any_instance_of(Redis).to receive(:ping).and_raise(Errno::ENOENT)
 
-      get api("/internal/check"), secret_token: secret_token
+      get api("/internal/check"), params: { secret_token: secret_token }
 
       expect(json_response['redis']).to be(false)
     end
@@ -33,7 +33,7 @@
       let!(:broadcast_message) { create(:broadcast_message, starts_at: 1.day.ago, ends_at: 1.day.from_now ) }
 
       it 'returns one broadcast message'  do
-        get api('/internal/broadcast_message'), secret_token: secret_token
+        get api('/internal/broadcast_message'), params: { secret_token: secret_token }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['message']).to eq(broadcast_message.message)
@@ -42,7 +42,7 @@
 
     context 'broadcast message does not exist' do
       it 'returns nothing'  do
-        get api('/internal/broadcast_message'), secret_token: secret_token
+        get api('/internal/broadcast_message'), params: { secret_token: secret_token }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response).to be_empty
@@ -53,7 +53,7 @@
       it 'returns nothing' do
         allow(BroadcastMessage).to receive(:current).and_return(nil)
 
-        get api('/internal/broadcast_message'), secret_token: secret_token
+        get api('/internal/broadcast_message'), params: { secret_token: secret_token }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response).to be_empty
@@ -66,7 +66,7 @@
       let!(:broadcast_message) { create(:broadcast_message, starts_at: 1.day.ago, ends_at: 1.day.from_now ) }
 
       it 'returns active broadcast message(s)' do
-        get api('/internal/broadcast_messages'), secret_token: secret_token
+        get api('/internal/broadcast_messages'), params: { secret_token: secret_token }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response[0]['message']).to eq(broadcast_message.message)
@@ -75,7 +75,7 @@
 
     context 'broadcast message does not exist' do
       it 'returns nothing' do
-        get api('/internal/broadcast_messages'), secret_token: secret_token
+        get api('/internal/broadcast_messages'), params: { secret_token: secret_token }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response).to be_empty
@@ -86,8 +86,10 @@
   describe 'GET /internal/two_factor_recovery_codes' do
     it 'returns an error message when the key does not exist' do
       post api('/internal/two_factor_recovery_codes'),
-           secret_token: secret_token,
-           key_id: 12345
+           params: {
+             secret_token: secret_token,
+             key_id: 12345
+           }
 
       expect(json_response['success']).to be_falsey
       expect(json_response['message']).to eq('Could not find the given key')
@@ -97,8 +99,10 @@
       deploy_key = create(:deploy_key)
 
       post api('/internal/two_factor_recovery_codes'),
-           secret_token: secret_token,
-           key_id: deploy_key.id
+           params: {
+             secret_token: secret_token,
+             key_id: deploy_key.id
+           }
 
       expect(json_response['success']).to be_falsey
       expect(json_response['message']).to eq('Deploy keys cannot be used to retrieve recovery codes')
@@ -108,8 +112,10 @@
       key_without_user = create(:key, user: nil)
 
       post api('/internal/two_factor_recovery_codes'),
-           secret_token: secret_token,
-           key_id: key_without_user.id
+           params: {
+             secret_token: secret_token,
+             key_id: key_without_user.id
+           }
 
       expect(json_response['success']).to be_falsey
       expect(json_response['message']).to eq('Could not find a user for the given key')
@@ -123,8 +129,10 @@
           .to receive(:generate_otp_backup_codes!).and_return(%w(119135e5a3ebce8e 34bd7b74adbc8861))
 
         post api('/internal/two_factor_recovery_codes'),
-             secret_token: secret_token,
-             key_id: key.id
+             params: {
+               secret_token: secret_token,
+               key_id: key.id
+             }
 
         expect(json_response['success']).to be_truthy
         expect(json_response['recovery_codes']).to match_array(%w(119135e5a3ebce8e 34bd7b74adbc8861))
@@ -136,8 +144,10 @@
         allow_any_instance_of(User).to receive(:two_factor_enabled?).and_return(false)
 
         post api('/internal/two_factor_recovery_codes'),
-             secret_token: secret_token,
-             key_id: key.id
+             params: {
+               secret_token: secret_token,
+               key_id: key.id
+             }
 
         expect(json_response['success']).to be_falsey
         expect(json_response['recovery_codes']).to be_nil
@@ -204,7 +214,7 @@
 
   describe "GET /internal/discover" do
     it "finds a user by key id" do
-      get(api("/internal/discover"), key_id: key.id, secret_token: secret_token)
+      get(api("/internal/discover"), params: { key_id: key.id, secret_token: secret_token })
 
       expect(response).to have_gitlab_http_status(200)
 
@@ -212,7 +222,7 @@
     end
 
     it "finds a user by user id" do
-      get(api("/internal/discover"), user_id: user.id, secret_token: secret_token)
+      get(api("/internal/discover"), params: { user_id: user.id, secret_token: secret_token })
 
       expect(response).to have_gitlab_http_status(200)
 
@@ -220,7 +230,7 @@
     end
 
     it "finds a user by username" do
-      get(api("/internal/discover"), username: user.username, secret_token: secret_token)
+      get(api("/internal/discover"), params: { username: user.username, secret_token: secret_token })
 
       expect(response).to have_gitlab_http_status(200)
 
@@ -231,7 +241,7 @@
   describe "GET /internal/authorized_keys" do
     context "using an existing key's fingerprint" do
       it "finds the key" do
-        get(api('/internal/authorized_keys'), fingerprint: key.fingerprint, secret_token: secret_token)
+        get(api('/internal/authorized_keys'), params: { fingerprint: key.fingerprint, secret_token: secret_token })
 
         expect(response.status).to eq(200)
         expect(json_response["key"]).to eq(key.key)
@@ -240,7 +250,7 @@
 
     context "non existing key's fingerprint" do
       it "returns 404" do
-        get(api('/internal/authorized_keys'), fingerprint: "no:t-:va:li:d0", secret_token: secret_token)
+        get(api('/internal/authorized_keys'), params: { fingerprint: "no:t-:va:li:d0", secret_token: secret_token })
 
         expect(response.status).to eq(404)
       end
@@ -248,7 +258,7 @@
 
     context "using a partial fingerprint" do
       it "returns 404" do
-        get(api('/internal/authorized_keys'), fingerprint: "#{key.fingerprint[0..5]}%", secret_token: secret_token)
+        get(api('/internal/authorized_keys'), params: { fingerprint: "#{key.fingerprint[0..5]}%", secret_token: secret_token })
 
         expect(response.status).to eq(404)
       end
@@ -256,20 +266,20 @@
 
     context "sending the key" do
       it "finds the key" do
-        get(api('/internal/authorized_keys'), key: key.key.split[1], secret_token: secret_token)
+        get(api('/internal/authorized_keys'), params: { key: key.key.split[1], secret_token: secret_token })
 
         expect(response.status).to eq(200)
         expect(json_response["key"]).to eq(key.key)
       end
 
       it "returns 404 with a partial key" do
-        get(api('/internal/authorized_keys'), key: key.key.split[1][0...-3], secret_token: secret_token)
+        get(api('/internal/authorized_keys'), params: { key: key.key.split[1][0...-3], secret_token: secret_token })
 
         expect(response.status).to eq(404)
       end
 
       it "returns 404 with an not valid base64 string" do
-        get(api('/internal/authorized_keys'), key: "whatever!", secret_token: secret_token)
+        get(api('/internal/authorized_keys'), params: { key: "whatever!", secret_token: secret_token })
 
         expect(response.status).to eq(404)
       end
@@ -677,7 +687,7 @@
     end
 
     it 'returns link to create new merge request' do
-      get api("/internal/merge_request_urls?project=#{repo_name}&changes=#{changes}"), secret_token: secret_token
+      get api("/internal/merge_request_urls?project=#{repo_name}&changes=#{changes}"), params: { secret_token: secret_token }
 
       expect(json_response).to match [{
         "branch_name" => "new_branch",
@@ -689,7 +699,7 @@
     it 'returns empty array if printing_merge_request_link_enabled is false' do
       project.update!(printing_merge_request_link_enabled: false)
 
-      get api("/internal/merge_request_urls?project=#{repo_name}&changes=#{changes}"), secret_token: secret_token
+      get api("/internal/merge_request_urls?project=#{repo_name}&changes=#{changes}"), params: { secret_token: secret_token }
 
       expect(json_response).to eq([])
     end
@@ -698,7 +708,7 @@
       let(:gl_repository) { "project-#{project.id}" }
 
       it 'returns link to create new merge request' do
-        get api("/internal/merge_request_urls?gl_repository=#{gl_repository}&changes=#{changes}"), secret_token: secret_token
+        get api("/internal/merge_request_urls?gl_repository=#{gl_repository}&changes=#{changes}"), params: { secret_token: secret_token }
 
         expect(json_response).to match [{
           "branch_name" => "new_branch",
@@ -817,7 +827,7 @@
       expect(PostReceive).to receive(:perform_async)
         .with(gl_repository, identifier, changes)
 
-      post api("/internal/post_receive"), valid_params
+      post api("/internal/post_receive"), params: valid_params
     end
 
     it 'decreases the reference counter and returns the result' do
@@ -825,13 +835,13 @@
         .and_return(reference_counter)
       expect(reference_counter).to receive(:decrease).and_return(true)
 
-      post api("/internal/post_receive"), valid_params
+      post api("/internal/post_receive"), params: valid_params
 
       expect(json_response['reference_counter_decreased']).to be(true)
     end
 
     it 'returns link to create new merge request' do
-      post api("/internal/post_receive"), valid_params
+      post api("/internal/post_receive"), params: valid_params
 
       expect(json_response['merge_request_urls']).to match [{
         "branch_name" => "new_branch",
@@ -843,7 +853,7 @@
     it 'returns empty array if printing_merge_request_link_enabled is false' do
       project.update!(printing_merge_request_link_enabled: false)
 
-      post api("/internal/post_receive"), valid_params
+      post api("/internal/post_receive"), params: valid_params
 
       expect(json_response['merge_request_urls']).to eq([])
     end
@@ -852,7 +862,7 @@
       let!(:broadcast_message) { create(:broadcast_message, starts_at: 1.day.ago, ends_at: 1.day.from_now ) }
 
       it 'returns one broadcast message'  do
-        post api("/internal/post_receive"), valid_params
+        post api("/internal/post_receive"), params: valid_params
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['broadcast_message']).to eq(broadcast_message.message)
@@ -861,7 +871,7 @@
 
     context 'broadcast message does not exist' do
       it 'returns empty string'  do
-        post api("/internal/post_receive"), valid_params
+        post api("/internal/post_receive"), params: valid_params
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['broadcast_message']).to eq(nil)
@@ -872,7 +882,7 @@
       it 'returns empty string' do
         allow(BroadcastMessage).to receive(:current).and_return(nil)
 
-        post api("/internal/post_receive"), valid_params
+        post api("/internal/post_receive"), params: valid_params
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['broadcast_message']).to eq(nil)
@@ -884,7 +894,7 @@
         project_moved = Gitlab::Checks::ProjectMoved.new(project, user, 'http', 'foo/baz')
         project_moved.add_message
 
-        post api("/internal/post_receive"), valid_params
+        post api("/internal/post_receive"), params: valid_params
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response["redirected_message"]).to be_present
@@ -897,7 +907,7 @@
         project_created = Gitlab::Checks::ProjectCreated.new(project, user, 'http')
         project_created.add_message
 
-        post api("/internal/post_receive"), valid_params
+        post api("/internal/post_receive"), params: valid_params
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response["project_created_message"]).to be_present
@@ -909,7 +919,7 @@
       it 'does not try to notify that project moved' do
         allow_any_instance_of(Gitlab::Identifier).to receive(:identify).and_return(nil)
 
-        post api("/internal/post_receive"), valid_params
+        post api("/internal/post_receive"), params: valid_params
 
         expect(response).to have_gitlab_http_status(200)
       end
@@ -926,7 +936,7 @@
         .and_return(reference_counter)
       expect(reference_counter).to receive(:increase).and_return(true)
 
-      post api("/internal/pre_receive"), valid_params
+      post api("/internal/pre_receive"), params: valid_params
 
       expect(json_response['reference_counter_increased']).to be(true)
     end
@@ -946,12 +956,14 @@ def gl_repository_for(project_or_wiki)
   def pull(key, project, protocol = 'ssh')
     post(
       api("/internal/allowed"),
-      key_id: key.id,
-      project: project.full_path,
-      gl_repository: gl_repository_for(project),
-      action: 'git-upload-pack',
-      secret_token: secret_token,
-      protocol: protocol
+      params: {
+        key_id: key.id,
+        project: project.full_path,
+        gl_repository: gl_repository_for(project),
+        action: 'git-upload-pack',
+        secret_token: secret_token,
+        protocol: protocol
+      }
     )
   end
 
@@ -976,39 +988,47 @@ def push(key, project, protocol = 'ssh', env: nil)
   def archive(key, project)
     post(
       api("/internal/allowed"),
-      ref: 'master',
-      key_id: key.id,
-      project: project.full_path,
-      gl_repository: gl_repository_for(project),
-      action: 'git-upload-archive',
-      secret_token: secret_token,
-      protocol: 'ssh'
+      params: {
+        ref: 'master',
+        key_id: key.id,
+        project: project.full_path,
+        gl_repository: gl_repository_for(project),
+        action: 'git-upload-archive',
+        secret_token: secret_token,
+        protocol: 'ssh'
+      }
     )
   end
 
   def lfs_auth_project(project)
     post(
       api("/internal/lfs_authenticate"),
-      secret_token: secret_token,
-      project: project.full_path
+      params: {
+        secret_token: secret_token,
+        project: project.full_path
+      }
     )
   end
 
   def lfs_auth_key(key_id, project)
     post(
       api("/internal/lfs_authenticate"),
-      key_id: key_id,
-      secret_token: secret_token,
-      project: project.full_path
+      params: {
+        key_id: key_id,
+        secret_token: secret_token,
+        project: project.full_path
+      }
     )
   end
 
   def lfs_auth_user(user_id, project)
     post(
       api("/internal/lfs_authenticate"),
-      user_id: user_id,
-      secret_token: secret_token,
-      project: project.full_path
+      params: {
+        user_id: user_id,
+        secret_token: secret_token,
+        project: project.full_path
+      }
     )
   end
 end
diff --git a/spec/requests/api/issues_spec.rb b/spec/requests/api/issues_spec.rb
index 325584d71992049d8611a3b9e60d84c49d8ac558..c76b52a47ef60ed89b878886e200bca2e98db575 100644
--- a/spec/requests/api/issues_spec.rb
+++ b/spec/requests/api/issues_spec.rb
@@ -70,7 +70,7 @@
   describe "GET /issues" do
     context "when unauthenticated" do
       it "returns an array of all issues" do
-        get api("/issues"), scope: 'all'
+        get api("/issues"), params: { scope: 'all' }
 
         expect(response).to have_http_status(200)
         expect(json_response).to be_an Array
@@ -83,13 +83,13 @@
       end
 
       it "returns authentication error when scope is assigned-to-me" do
-        get api("/issues"), scope: 'assigned-to-me'
+        get api("/issues"), params: { scope: 'assigned-to-me' }
 
         expect(response).to have_http_status(401)
       end
 
       it "returns authentication error when scope is created-by-me" do
-        get api("/issues"), scope: 'created-by-me'
+        get api("/issues"), params: { scope: 'created-by-me' }
 
         expect(response).to have_http_status(401)
       end
@@ -107,21 +107,21 @@
       end
 
       it 'returns an array of closed issues' do
-        get api('/issues', user), state: :closed
+        get api('/issues', user), params: { state: :closed }
 
         expect_paginated_array_response(size: 1)
         expect(first_issue['id']).to eq(closed_issue.id)
       end
 
       it 'returns an array of opened issues' do
-        get api('/issues', user), state: :opened
+        get api('/issues', user), params: { state: :opened }
 
         expect_paginated_array_response(size: 1)
         expect(first_issue['id']).to eq(issue.id)
       end
 
       it 'returns an array of all issues' do
-        get api('/issues', user), state: :all
+        get api('/issues', user), params: { state: :all }
 
         expect_paginated_array_response(size: 2)
         expect(first_issue['id']).to eq(issue.id)
@@ -131,7 +131,7 @@
       it 'returns issues assigned to me' do
         issue2 = create(:issue, assignees: [user2], project: project)
 
-        get api('/issues', user2), scope: 'assigned_to_me'
+        get api('/issues', user2), params: { scope: 'assigned_to_me' }
 
         expect_paginated_array_response(size: 1)
         expect(first_issue['id']).to eq(issue2.id)
@@ -140,7 +140,7 @@
       it 'returns issues assigned to me (kebab-case)' do
         issue2 = create(:issue, assignees: [user2], project: project)
 
-        get api('/issues', user2), scope: 'assigned-to-me'
+        get api('/issues', user2), params: { scope: 'assigned-to-me' }
 
         expect_paginated_array_response(size: 1)
         expect(first_issue['id']).to eq(issue2.id)
@@ -149,7 +149,7 @@
       it 'returns issues authored by the given author id' do
         issue2 = create(:issue, author: user2, project: project)
 
-        get api('/issues', user), author_id: user2.id, scope: 'all'
+        get api('/issues', user), params: { author_id: user2.id, scope: 'all' }
 
         expect_paginated_array_response(size: 1)
         expect(first_issue['id']).to eq(issue2.id)
@@ -158,7 +158,7 @@
       it 'returns issues assigned to the given assignee id' do
         issue2 = create(:issue, assignees: [user2], project: project)
 
-        get api('/issues', user), assignee_id: user2.id, scope: 'all'
+        get api('/issues', user), params: { assignee_id: user2.id, scope: 'all' }
 
         expect_paginated_array_response(size: 1)
         expect(first_issue['id']).to eq(issue2.id)
@@ -167,7 +167,7 @@
       it 'returns issues authored by the given author id and assigned to the given assignee id' do
         issue2 = create(:issue, author: user2, assignees: [user2], project: project)
 
-        get api('/issues', user), author_id: user2.id, assignee_id: user2.id, scope: 'all'
+        get api('/issues', user), params: { author_id: user2.id, assignee_id: user2.id, scope: 'all' }
 
         expect_paginated_array_response(size: 1)
         expect(first_issue['id']).to eq(issue2.id)
@@ -176,7 +176,7 @@
       it 'returns issues with no assignee' do
         issue2 = create(:issue, author: user2, project: project)
 
-        get api('/issues', user), assignee_id: 0, scope: 'all'
+        get api('/issues', user), params: { assignee_id: 0, scope: 'all' }
 
         expect_paginated_array_response(size: 1)
         expect(first_issue['id']).to eq(issue2.id)
@@ -185,7 +185,7 @@
       it 'returns issues with no assignee' do
         issue2 = create(:issue, author: user2, project: project)
 
-        get api('/issues', user), assignee_id: 'None', scope: 'all'
+        get api('/issues', user), params: { assignee_id: 'None', scope: 'all' }
 
         expect_paginated_array_response(size: 1)
         expect(first_issue['id']).to eq(issue2.id)
@@ -195,7 +195,7 @@
         # This issue without assignee should not be returned
         create(:issue, author: user2, project: project)
 
-        get api('/issues', user), assignee_id: 'Any', scope: 'all'
+        get api('/issues', user), params: { assignee_id: 'Any', scope: 'all' }
 
         expect_paginated_array_response(size: 3)
       end
@@ -206,7 +206,7 @@
 
         create(:award_emoji, awardable: issue, user: user2, name: 'thumbsup')
 
-        get api('/issues', user2), my_reaction_emoji: 'Any', scope: 'all'
+        get api('/issues', user2), params: { my_reaction_emoji: 'Any', scope: 'all' }
 
         expect_paginated_array_response(size: 2)
       end
@@ -215,20 +215,20 @@
         issue2 = create(:issue, project: project, author: user, assignees: [user])
         create(:award_emoji, awardable: issue2, user: user2, name: 'star')
 
-        get api('/issues', user2), my_reaction_emoji: 'None', scope: 'all'
+        get api('/issues', user2), params: { my_reaction_emoji: 'None', scope: 'all' }
 
         expect_paginated_array_response(size: 2)
       end
 
       it 'returns issues matching given search string for title' do
-        get api("/issues", user), search: issue.title
+        get api("/issues", user), params: { search: issue.title }
 
         expect_paginated_array_response(size: 1)
         expect(json_response.first['id']).to eq(issue.id)
       end
 
       it 'returns issues matching given search string for description' do
-        get api("/issues", user), search: issue.description
+        get api("/issues", user), params: { search: issue.description }
 
         expect_paginated_array_response(size: 1)
         expect(first_issue['id']).to eq(issue.id)
@@ -271,7 +271,7 @@
       end
 
       it 'returns an array of labeled issues' do
-        get api("/issues", user), labels: label.title
+        get api("/issues", user), params: { labels: label.title }
 
         expect_paginated_array_response(size: 1)
         expect(first_issue['labels']).to eq([label.title])
@@ -284,20 +284,20 @@
         create(:label_link, label: label_b, target: issue)
         create(:label_link, label: label_c, target: issue)
 
-        get api("/issues", user), labels: "#{label.title},#{label_b.title},#{label_c.title}"
+        get api("/issues", user), params: { labels: "#{label.title},#{label_b.title},#{label_c.title}" }
 
         expect_paginated_array_response(size: 1)
         expect(json_response.first['labels']).to eq([label_c.title, label_b.title, label.title])
       end
 
       it 'returns an empty array if no issue matches labels' do
-        get api('/issues', user), labels: 'foo,bar'
+        get api('/issues', user), params: { labels: 'foo,bar' }
 
         expect_paginated_array_response(size: 0)
       end
 
       it 'returns an array of labeled issues matching given state' do
-        get api("/issues", user), labels: label.title, state: :opened
+        get api("/issues", user), params: { labels: label.title, state: :opened }
 
         expect_paginated_array_response(size: 1)
         expect(json_response.first['labels']).to eq([label.title])
@@ -305,27 +305,27 @@
       end
 
       it 'returns an empty array if no issue matches labels and state filters' do
-        get api("/issues", user), labels: label.title, state: :closed
+        get api("/issues", user), params: { labels: label.title, state: :closed }
 
         expect_paginated_array_response(size: 0)
       end
 
       it 'returns an array of issues with any label' do
-        get api("/issues", user), labels: IssuesFinder::FILTER_ANY
+        get api("/issues", user), params: { labels: IssuesFinder::FILTER_ANY }
 
         expect_paginated_array_response(size: 1)
         expect(json_response.first['id']).to eq(issue.id)
       end
 
       it 'returns an array of issues with no label' do
-        get api("/issues", user), labels: IssuesFinder::FILTER_NONE
+        get api("/issues", user), params: { labels: IssuesFinder::FILTER_NONE }
 
         expect_paginated_array_response(size: 1)
         expect(json_response.first['id']).to eq(closed_issue.id)
       end
 
       it 'returns an array of issues with no label when using the legacy No+Label filter' do
-        get api("/issues", user), labels: "No Label"
+        get api("/issues", user), params: { labels: "No Label" }
 
         expect_paginated_array_response(size: 1)
         expect(json_response.first['id']).to eq(closed_issue.id)
@@ -367,14 +367,14 @@
       end
 
       it 'returns an array of issues found by iids' do
-        get api('/issues', user), iids: [closed_issue.iid]
+        get api('/issues', user), params: { iids: [closed_issue.iid] }
 
         expect_paginated_array_response(size: 1)
         expect(json_response.first['id']).to eq(closed_issue.id)
       end
 
       it 'returns an empty array if iid does not exist' do
-        get api("/issues", user), iids: [99999]
+        get api("/issues", user), params: { iids: [99999] }
 
         expect_paginated_array_response(size: 0)
       end
@@ -510,58 +510,58 @@
       end
 
       it 'returns group issues without confidential issues for non project members' do
-        get api(base_url, non_member), state: :opened
+        get api(base_url, non_member), params: { state: :opened }
 
         expect_paginated_array_response(size: 1)
         expect(json_response.first['title']).to eq(group_issue.title)
       end
 
       it 'returns group confidential issues for author' do
-        get api(base_url, author), state: :opened
+        get api(base_url, author), params: { state: :opened }
 
         expect_paginated_array_response(size: 2)
       end
 
       it 'returns group confidential issues for assignee' do
-        get api(base_url, assignee), state: :opened
+        get api(base_url, assignee), params: { state: :opened }
 
         expect_paginated_array_response(size: 2)
       end
 
       it 'returns group issues with confidential issues for project members' do
-        get api(base_url, user), state: :opened
+        get api(base_url, user), params: { state: :opened }
 
         expect_paginated_array_response(size: 2)
       end
 
       it 'returns group confidential issues for admin' do
-        get api(base_url, admin), state: :opened
+        get api(base_url, admin), params: { state: :opened }
 
         expect_paginated_array_response(size: 2)
       end
 
       it 'returns an array of labeled group issues' do
-        get api(base_url, user), labels: group_label.title
+        get api(base_url, user), params: { labels: group_label.title }
 
         expect_paginated_array_response(size: 1)
         expect(json_response.first['labels']).to eq([group_label.title])
       end
 
       it 'returns an array of labeled group issues where all labels match' do
-        get api(base_url, user), labels: "#{group_label.title},foo,bar"
+        get api(base_url, user), params: { labels: "#{group_label.title},foo,bar" }
 
         expect_paginated_array_response(size: 0)
       end
 
       it 'returns issues matching given search string for title' do
-        get api(base_url, user), search: group_issue.title
+        get api(base_url, user), params: { search: group_issue.title }
 
         expect_paginated_array_response(size: 1)
         expect(json_response.first['id']).to eq(group_issue.id)
       end
 
       it 'returns issues matching given search string for description' do
-        get api(base_url, user), search: group_issue.description
+        get api(base_url, user), params: { search: group_issue.description }
 
         expect_paginated_array_response(size: 1)
         expect(json_response.first['id']).to eq(group_issue.id)
@@ -574,40 +574,40 @@
         create(:label_link, label: label_b, target: group_issue)
         create(:label_link, label: label_c, target: group_issue)
 
-        get api(base_url, user), labels: "#{group_label.title},#{label_b.title},#{label_c.title}"
+        get api(base_url, user), params: { labels: "#{group_label.title},#{label_b.title},#{label_c.title}" }
 
         expect_paginated_array_response(size: 1)
         expect(json_response.first['labels']).to eq([label_c.title, label_b.title, group_label.title])
       end
 
       it 'returns an array of issues found by iids' do
-        get api(base_url, user), iids: [group_issue.iid]
+        get api(base_url, user), params: { iids: [group_issue.iid] }
 
         expect_paginated_array_response(size: 1)
         expect(json_response.first['id']).to eq(group_issue.id)
       end
 
       it 'returns an empty array if iid does not exist' do
-        get api(base_url, user), iids: [99999]
+        get api(base_url, user), params: { iids: [99999] }
 
         expect_paginated_array_response(size: 0)
       end
 
       it 'returns an empty array if no group issue matches labels' do
-        get api(base_url, user), labels: 'foo,bar'
+        get api(base_url, user), params: { labels: 'foo,bar' }
 
         expect_paginated_array_response(size: 0)
       end
 
       it 'returns an array of group issues with any label' do
-        get api(base_url, user), labels: IssuesFinder::FILTER_ANY
+        get api(base_url, user), params: { labels: IssuesFinder::FILTER_ANY }
 
         expect_paginated_array_response(size: 1)
         expect(json_response.first['id']).to eq(group_issue.id)
       end
 
       it 'returns an array of group issues with no label' do
-        get api(base_url, user), labels: IssuesFinder::FILTER_NONE
+        get api(base_url, user), params: { labels: IssuesFinder::FILTER_NONE }
 
         response_ids = json_response.map { |issue| issue['id'] }
 
@@ -616,33 +616,33 @@
       end
 
       it 'returns an empty array if no issue matches milestone' do
-        get api(base_url, user), milestone: group_empty_milestone.title
+        get api(base_url, user), params: { milestone: group_empty_milestone.title }
 
         expect_paginated_array_response(size: 0)
       end
 
       it 'returns an empty array if milestone does not exist' do
-        get api(base_url, user), milestone: 'foo'
+        get api(base_url, user), params: { milestone: 'foo' }
 
         expect_paginated_array_response(size: 0)
       end
 
       it 'returns an array of issues in given milestone' do
-        get api(base_url, user), state: :opened, milestone: group_milestone.title
+        get api(base_url, user), params: { state: :opened, milestone: group_milestone.title }
 
         expect_paginated_array_response(size: 1)
         expect(json_response.first['id']).to eq(group_issue.id)
       end
 
       it 'returns an array of issues matching state in milestone' do
-        get api(base_url, user), milestone: group_milestone.title, state: :closed
+        get api(base_url, user), params: { milestone: group_milestone.title, state: :closed }
 
         expect_paginated_array_response(size: 1)
         expect(json_response.first['id']).to eq(group_closed_issue.id)
       end
 
       it 'returns an array of issues with no milestone' do
-        get api(base_url, user), milestone: no_milestone_title
+        get api(base_url, user), params: { milestone: no_milestone_title }
 
         expect(response).to have_gitlab_http_status(200)
 
@@ -678,7 +678,7 @@
       end
 
       it 'sorts by updated_at ascending when requested' do
-        get api(base_url, user), order_by: :updated_at, sort: :asc
+        get api(base_url, user), params: { order_by: :updated_at, sort: :asc }
 
         response_dates = json_response.map { |issue| issue['updated_at'] }
 
@@ -781,7 +781,7 @@
     end
 
     it 'returns an array of labeled project issues' do
-      get api("#{base_url}/issues", user), labels: label.title
+      get api("#{base_url}/issues", user), params: { labels: label.title }
 
       expect_paginated_array_response(size: 1)
       expect(json_response.first['labels']).to eq([label.title])
@@ -794,7 +794,7 @@
       create(:label_link, label: label_b, target: issue)
       create(:label_link, label: label_c, target: issue)
 
-      get api("#{base_url}/issues", user), labels: "#{label.title},#{label_b.title},#{label_c.title}"
+      get api("#{base_url}/issues", user), params: { labels: "#{label.title},#{label_b.title},#{label_c.title}" }
 
       expect_paginated_array_response(size: 1)
       expect(json_response.first['labels']).to eq([label_c.title, label_b.title, label.title])
@@ -815,14 +815,14 @@
     end
 
     it 'returns an array of issues found by iids' do
-      get api("#{base_url}/issues", user), iids: [issue.iid]
+      get api("#{base_url}/issues", user), params: { iids: [issue.iid] }
 
       expect_paginated_array_response(size: 1)
       expect(json_response.first['id']).to eq(issue.id)
     end
 
     it 'returns an empty array if iid does not exist' do
-      get api("#{base_url}/issues", user), iids: [99999]
+      get api("#{base_url}/issues", user), params: { iids: [99999] }
 
       expect_paginated_array_response(size: 0)
     end
@@ -834,14 +834,14 @@
     end
 
     it 'returns an array of project issues with any label' do
-      get api("#{base_url}/issues", user), labels: IssuesFinder::FILTER_ANY
+      get api("#{base_url}/issues", user), params: { labels: IssuesFinder::FILTER_ANY }
 
       expect_paginated_array_response(size: 1)
       expect(json_response.first['id']).to eq(issue.id)
     end
 
     it 'returns an array of project issues with no label' do
-      get api("#{base_url}/issues", user), labels: IssuesFinder::FILTER_NONE
+      get api("#{base_url}/issues", user), params: { labels: IssuesFinder::FILTER_NONE }
 
       response_ids = json_response.map { |issue| issue['id'] }
 
@@ -850,25 +850,25 @@
     end
 
     it 'returns an empty array if no project issue matches labels' do
-      get api("#{base_url}/issues", user), labels: 'foo,bar'
+      get api("#{base_url}/issues", user), params: { labels: 'foo,bar' }
 
       expect_paginated_array_response(size: 0)
     end
 
     it 'returns an empty array if no issue matches milestone' do
-      get api("#{base_url}/issues", user), milestone: empty_milestone.title
+      get api("#{base_url}/issues", user), params: { milestone: empty_milestone.title }
 
       expect_paginated_array_response(size: 0)
     end
 
     it 'returns an empty array if milestone does not exist' do
-      get api("#{base_url}/issues", user), milestone: :foo
+      get api("#{base_url}/issues", user), params: { milestone: :foo }
 
       expect_paginated_array_response(size: 0)
     end
 
     it 'returns an array of issues in given milestone' do
-      get api("#{base_url}/issues", user), milestone: milestone.title
+      get api("#{base_url}/issues", user), params: { milestone: milestone.title }
 
       expect_paginated_array_response(size: 2)
       expect(json_response.first['id']).to eq(issue.id)
@@ -876,21 +876,21 @@
     end
 
     it 'returns an array of issues matching state in milestone' do
-      get api("#{base_url}/issues", user), milestone: milestone.title, state: :closed
+      get api("#{base_url}/issues", user), params: { milestone: milestone.title, state: :closed }
 
       expect_paginated_array_response(size: 1)
       expect(json_response.first['id']).to eq(closed_issue.id)
     end
 
     it 'returns an array of issues with no milestone' do
-      get api("#{base_url}/issues", user), milestone: no_milestone_title
+      get api("#{base_url}/issues", user), params: { milestone: no_milestone_title }
 
       expect_paginated_array_response(size: 1)
       expect(json_response.first['id']).to eq(confidential_issue.id)
     end
 
     it 'returns an array of issues with any milestone' do
-      get api("#{base_url}/issues", user), milestone: any_milestone_title
+      get api("#{base_url}/issues", user), params: { milestone: any_milestone_title }
 
       response_ids = json_response.map { |issue| issue['id'] }
 
@@ -908,7 +908,7 @@
     end
 
     it 'sorts ascending when requested' do
-      get api("#{base_url}/issues", user), sort: :asc
+      get api("#{base_url}/issues", user), params: { sort: :asc }
 
       response_dates = json_response.map { |issue| issue['created_at'] }
 
@@ -917,7 +917,7 @@
     end
 
     it 'sorts by updated_at descending when requested' do
-      get api("#{base_url}/issues", user), order_by: :updated_at
+      get api("#{base_url}/issues", user), params: { order_by: :updated_at }
 
       response_dates = json_response.map { |issue| issue['updated_at'] }
 
@@ -926,7 +926,7 @@
     end
 
     it 'sorts by updated_at ascending when requested' do
-      get api("#{base_url}/issues", user), order_by: :updated_at, sort: :asc
+      get api("#{base_url}/issues", user), params: { order_by: :updated_at, sort: :asc }
 
       response_dates = json_response.map { |issue| issue['updated_at'] }
 
@@ -1055,7 +1055,7 @@
     context 'support for deprecated assignee_id' do
       it 'creates a new project issue' do
         post api("/projects/#{project.id}/issues", user),
-          title: 'new issue', assignee_id: user2.id
+          params: { title: 'new issue', assignee_id: user2.id }
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['title']).to eq('new issue')
@@ -1065,7 +1065,7 @@
 
       it 'creates a new project issue when assignee_id is empty' do
         post api("/projects/#{project.id}/issues", user),
-          title: 'new issue', assignee_id: ''
+          params: { title: 'new issue', assignee_id: '' }
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['title']).to eq('new issue')
@@ -1076,7 +1076,7 @@
     context 'single assignee restrictions' do
       it 'creates a new project issue with no more than one assignee' do
         post api("/projects/#{project.id}/issues", user),
-          title: 'new issue', assignee_ids: [user2.id, guest.id]
+          params: { title: 'new issue', assignee_ids: [user2.id, guest.id] }
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['title']).to eq('new issue')
@@ -1092,7 +1092,7 @@
       end
 
       it 'renders 403' do
-        post api("/projects/#{project.id}/issues", not_member), title: 'new issue'
+        post api("/projects/#{project.id}/issues", not_member), params: { title: 'new issue' }
 
         expect(response).to have_gitlab_http_status(403)
       end
@@ -1102,7 +1102,7 @@
       context 'by an admin' do
         it 'sets the internal ID on the new issue' do
           post api("/projects/#{project.id}/issues", admin),
-            title: 'new issue', iid: 9001
+            params: { title: 'new issue', iid: 9001 }
 
           expect(response).to have_gitlab_http_status(201)
           expect(json_response['iid']).to eq 9001
@@ -1112,7 +1112,7 @@
       context 'by an owner' do
         it 'sets the internal ID on the new issue' do
           post api("/projects/#{project.id}/issues", user),
-            title: 'new issue', iid: 9001
+            params: { title: 'new issue', iid: 9001 }
 
           expect(response).to have_gitlab_http_status(201)
           expect(json_response['iid']).to eq 9001
@@ -1126,7 +1126,7 @@
         it 'sets the internal ID on the new issue' do
           group.add_owner(user2)
           post api("/projects/#{group_project.id}/issues", user2),
-            title: 'new issue', iid: 9001
+            params: { title: 'new issue', iid: 9001 }
 
           expect(response).to have_gitlab_http_status(201)
           expect(json_response['iid']).to eq 9001
@@ -1136,7 +1136,7 @@
       context 'by another user' do
         it 'ignores the given internal ID' do
           post api("/projects/#{project.id}/issues", user2),
-            title: 'new issue', iid: 9001
+            params: { title: 'new issue', iid: 9001 }
 
           expect(response).to have_gitlab_http_status(201)
           expect(json_response['iid']).not_to eq 9001
@@ -1146,8 +1146,7 @@
 
     it 'creates a new project issue' do
       post api("/projects/#{project.id}/issues", user),
-        title: 'new issue', labels: 'label, label2', weight: 3,
-        assignee_ids: [user2.id]
+        params: { title: 'new issue', labels: 'label, label2', weight: 3, assignee_ids: [user2.id] }
 
       expect(response).to have_gitlab_http_status(201)
       expect(json_response['title']).to eq('new issue')
@@ -1160,7 +1159,7 @@
 
     it 'creates a new confidential project issue' do
       post api("/projects/#{project.id}/issues", user),
-        title: 'new issue', confidential: true
+        params: { title: 'new issue', confidential: true }
 
       expect(response).to have_gitlab_http_status(201)
       expect(json_response['title']).to eq('new issue')
@@ -1169,7 +1168,7 @@
 
     it 'creates a new confidential project issue with a different param' do
       post api("/projects/#{project.id}/issues", user),
-        title: 'new issue', confidential: 'y'
+        params: { title: 'new issue', confidential: 'y' }
 
       expect(response).to have_gitlab_http_status(201)
       expect(json_response['title']).to eq('new issue')
@@ -1178,7 +1177,7 @@
 
     it 'creates a public issue when confidential param is false' do
       post api("/projects/#{project.id}/issues", user),
-        title: 'new issue', confidential: false
+        params: { title: 'new issue', confidential: false }
 
       expect(response).to have_gitlab_http_status(201)
       expect(json_response['title']).to eq('new issue')
@@ -1187,21 +1186,23 @@
 
     it 'creates a public issue when confidential param is invalid' do
       post api("/projects/#{project.id}/issues", user),
-        title: 'new issue', confidential: 'foo'
+        params: { title: 'new issue', confidential: 'foo' }
 
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['error']).to eq('confidential is invalid')
     end
 
     it "returns a 400 bad request if title not given" do
-      post api("/projects/#{project.id}/issues", user), labels: 'label, label2'
+      post api("/projects/#{project.id}/issues", user), params: { labels: 'label, label2' }
       expect(response).to have_gitlab_http_status(400)
     end
 
     it 'allows special label names' do
       post api("/projects/#{project.id}/issues", user),
-           title: 'new issue',
-           labels: 'label, label?, label&foo, ?, &'
+           params: {
+             title: 'new issue',
+             labels: 'label, label?, label&foo, ?, &'
+           }
       expect(response.status).to eq(201)
       expect(json_response['labels']).to include 'label'
       expect(json_response['labels']).to include 'label?'
@@ -1212,7 +1213,7 @@
 
     it 'returns 400 if title is too long' do
       post api("/projects/#{project.id}/issues", user),
-           title: 'g' * 256
+           params: { title: 'g' * 256 }
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['message']['title']).to eq([
         'is too long (maximum is 255 characters)'
@@ -1231,8 +1232,10 @@
       context 'resolving all discussions in a merge request' do
         before do
           post api("/projects/#{project.id}/issues", user),
-               title: 'New Issue',
-               merge_request_to_resolve_discussions_of: merge_request.iid
+               params: {
+                 title: 'New Issue',
+                 merge_request_to_resolve_discussions_of: merge_request.iid
+               }
         end
 
         it_behaves_like 'creating an issue resolving discussions through the API'
@@ -1241,9 +1244,11 @@
       context 'resolving a single discussion' do
         before do
           post api("/projects/#{project.id}/issues", user),
-               title: 'New Issue',
-               merge_request_to_resolve_discussions_of: merge_request.iid,
-               discussion_to_resolve: discussion.id
+               params: {
+                 title: 'New Issue',
+                 merge_request_to_resolve_discussions_of: merge_request.iid,
+                 discussion_to_resolve: discussion.id
+               }
         end
 
         it_behaves_like 'creating an issue resolving discussions through the API'
@@ -1255,7 +1260,7 @@
         due_date = 2.weeks.from_now.strftime('%Y-%m-%d')
 
         post api("/projects/#{project.id}/issues", user),
-          title: 'new issue', due_date: due_date
+          params: { title: 'new issue', due_date: due_date }
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['title']).to eq('new issue')
@@ -1270,7 +1275,7 @@
 
       context 'by an admin' do
         it 'sets the creation time on the new issue' do
-          post api("/projects/#{project.id}/issues", admin), params
+          post api("/projects/#{project.id}/issues", admin), params: params
 
           expect(response).to have_gitlab_http_status(201)
           expect(Time.parse(json_response['created_at'])).to be_like_time(creation_time)
@@ -1279,7 +1284,7 @@
 
       context 'by a project owner' do
         it 'sets the creation time on the new issue' do
-          post api("/projects/#{project.id}/issues", user), params
+          post api("/projects/#{project.id}/issues", user), params: params
 
           expect(response).to have_gitlab_http_status(201)
           expect(Time.parse(json_response['created_at'])).to be_like_time(creation_time)
@@ -1291,7 +1296,7 @@
           group = create(:group)
           group_project = create(:project, :public, namespace: group)
           group.add_owner(user2)
-          post api("/projects/#{group_project.id}/issues", user2), params
+          post api("/projects/#{group_project.id}/issues", user2), params: params
 
           expect(response).to have_gitlab_http_status(201)
           expect(Time.parse(json_response['created_at'])).to be_like_time(creation_time)
@@ -1300,7 +1305,7 @@
 
       context 'by another user' do
         it 'ignores the given creation time' do
-          post api("/projects/#{project.id}/issues", user2), params
+          post api("/projects/#{project.id}/issues", user2), params: params
 
           expect(response).to have_gitlab_http_status(201)
           expect(Time.parse(json_response['created_at'])).not_to be_like_time(creation_time)
@@ -1311,7 +1316,7 @@
     context 'the user can only read the issue' do
       it 'cannot create new labels' do
         expect do
-          post api("/projects/#{project.id}/issues", non_member), title: 'new issue', labels: 'label, label2'
+          post api("/projects/#{project.id}/issues", non_member), params: { title: 'new issue', labels: 'label, label2' }
         end.not_to change { project.labels.count }
       end
     end
@@ -1332,7 +1337,7 @@
     end
 
     it "does not create a new project issue" do
-      expect { post api("/projects/#{project.id}/issues", user), params }.not_to change(Issue, :count)
+      expect { post api("/projects/#{project.id}/issues", user), params: params }.not_to change(Issue, :count)
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['message']).to eq({ "error" => "Spam detected" })
 
@@ -1348,7 +1353,7 @@
   describe "PUT /projects/:id/issues/:issue_iid to update only title" do
     it "updates a project issue" do
       put api("/projects/#{project.id}/issues/#{issue.iid}", user),
-        title: 'updated title'
+        params: { title: 'updated title' }
       expect(response).to have_gitlab_http_status(200)
 
       expect(json_response['title']).to eq('updated title')
@@ -1356,20 +1361,22 @@
 
     it "returns 404 error if issue iid not found" do
       put api("/projects/#{project.id}/issues/44444", user),
-        title: 'updated title'
+        params: { title: 'updated title' }
       expect(response).to have_gitlab_http_status(404)
     end
 
     it "returns 404 error if issue id is used instead of the iid" do
       put api("/projects/#{project.id}/issues/#{issue.id}", user),
-          title: 'updated title'
+          params: { title: 'updated title' }
       expect(response).to have_gitlab_http_status(404)
     end
 
     it 'allows special label names' do
       put api("/projects/#{project.id}/issues/#{issue.iid}", user),
-          title: 'updated title',
-          labels: 'label, label?, label&foo, ?, &'
+          params: {
+            title: 'updated title',
+            labels: 'label, label?, label&foo, ?, &'
+          }
 
       expect(response.status).to eq(200)
       expect(json_response['labels']).to include 'label'
@@ -1382,40 +1389,40 @@
     context 'confidential issues' do
       it "returns 403 for non project members" do
         put api("/projects/#{project.id}/issues/#{confidential_issue.iid}", non_member),
-          title: 'updated title'
+          params: { title: 'updated title' }
         expect(response).to have_gitlab_http_status(403)
       end
 
       it "returns 403 for project members with guest role" do
         put api("/projects/#{project.id}/issues/#{confidential_issue.iid}", guest),
-          title: 'updated title'
+          params: { title: 'updated title' }
         expect(response).to have_gitlab_http_status(403)
       end
 
       it "updates a confidential issue for project members" do
         put api("/projects/#{project.id}/issues/#{confidential_issue.iid}", user),
-          title: 'updated title'
+          params: { title: 'updated title' }
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['title']).to eq('updated title')
       end
 
       it "updates a confidential issue for author" do
         put api("/projects/#{project.id}/issues/#{confidential_issue.iid}", author),
-          title: 'updated title'
+          params: { title: 'updated title' }
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['title']).to eq('updated title')
       end
 
       it "updates a confidential issue for admin" do
         put api("/projects/#{project.id}/issues/#{confidential_issue.iid}", admin),
-          title: 'updated title'
+          params: { title: 'updated title' }
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['title']).to eq('updated title')
       end
 
       it 'sets an issue to confidential' do
         put api("/projects/#{project.id}/issues/#{issue.iid}", user),
-          confidential: true
+          params: { confidential: true }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['confidential']).to be_truthy
@@ -1423,7 +1430,7 @@
 
       it 'makes a confidential issue public' do
         put api("/projects/#{project.id}/issues/#{confidential_issue.iid}", user),
-          confidential: false
+          params: { confidential: false }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['confidential']).to be_falsy
@@ -1431,7 +1438,7 @@
 
       it 'does not update a confidential issue with wrong confidential flag' do
         put api("/projects/#{project.id}/issues/#{confidential_issue.iid}", user),
-          confidential: 'foo'
+          params: { confidential: 'foo' }
 
         expect(response).to have_gitlab_http_status(400)
         expect(json_response['error']).to eq('confidential is invalid')
@@ -1452,7 +1459,7 @@
       allow_any_instance_of(SpamService).to receive_messages(check_for_spam?: true)
       allow_any_instance_of(AkismetService).to receive_messages(spam?: true)
 
-      put api("/projects/#{project.id}/issues/#{issue.iid}", user), params
+      put api("/projects/#{project.id}/issues/#{issue.iid}", user), params: params
 
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['message']).to eq({ "error" => "Spam detected" })
@@ -1470,7 +1477,7 @@
     context 'support for deprecated assignee_id' do
       it 'removes assignee' do
         put api("/projects/#{project.id}/issues/#{issue.iid}", user),
-          assignee_id: 0
+          params: { assignee_id: 0 }
 
         expect(response).to have_gitlab_http_status(200)
 
@@ -1479,7 +1486,7 @@
 
       it 'updates an issue with new assignee' do
         put api("/projects/#{project.id}/issues/#{issue.iid}", user),
-          assignee_id: user2.id
+          params: { assignee_id: user2.id }
 
         expect(response).to have_gitlab_http_status(200)
 
@@ -1489,7 +1496,7 @@
 
     it 'removes assignee' do
       put api("/projects/#{project.id}/issues/#{issue.iid}", user),
-        assignee_ids: [0]
+        params: { assignee_ids: [0] }
 
       expect(response).to have_gitlab_http_status(200)
 
@@ -1498,7 +1505,7 @@
 
     it 'updates an issue with new assignee' do
       put api("/projects/#{project.id}/issues/#{issue.iid}", user),
-        assignee_ids: [user2.id]
+        params: { assignee_ids: [user2.id] }
 
       expect(response).to have_gitlab_http_status(200)
 
@@ -1508,7 +1515,7 @@
     context 'single assignee restrictions' do
       it 'updates an issue with several assignees but only one has been applied' do
         put api("/projects/#{project.id}/issues/#{issue.iid}", user),
-          assignee_ids: [user2.id, guest.id]
+          params: { assignee_ids: [user2.id, guest.id] }
 
         expect(response).to have_gitlab_http_status(200)
 
@@ -1523,14 +1530,14 @@
 
     it 'does not update labels if not present' do
       put api("/projects/#{project.id}/issues/#{issue.iid}", user),
-          title: 'updated title'
+          params: { title: 'updated title' }
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['labels']).to eq([label.title])
     end
 
     it 'removes all labels and touches the record' do
       Timecop.travel(1.minute.from_now) do
-        put api("/projects/#{project.id}/issues/#{issue.iid}", user), labels: ''
+        put api("/projects/#{project.id}/issues/#{issue.iid}", user), params: { labels: '' }
       end
 
       expect(response).to have_gitlab_http_status(200)
@@ -1541,7 +1548,7 @@
     it 'updates labels and touches the record' do
       Timecop.travel(1.minute.from_now) do
         put api("/projects/#{project.id}/issues/#{issue.iid}", user),
-          labels: 'foo,bar'
+          params: { labels: 'foo,bar' }
       end
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['labels']).to include 'foo'
@@ -1551,7 +1558,7 @@
 
     it 'allows special label names' do
       put api("/projects/#{project.id}/issues/#{issue.iid}", user),
-          labels: 'label:foo, label-bar,label_bar,label/bar,label?bar,label&bar,?,&'
+          params: { labels: 'label:foo, label-bar,label_bar,label/bar,label?bar,label&bar,?,&' }
       expect(response.status).to eq(200)
       expect(json_response['labels']).to include 'label:foo'
       expect(json_response['labels']).to include 'label-bar'
@@ -1565,7 +1572,7 @@
 
     it 'returns 400 if title is too long' do
       put api("/projects/#{project.id}/issues/#{issue.iid}", user),
-          title: 'g' * 256
+          params: { title: 'g' * 256 }
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['message']['title']).to eq([
         'is too long (maximum is 255 characters)'
@@ -1576,7 +1583,7 @@
   describe "PUT /projects/:id/issues/:issue_iid to update state and label" do
     it "updates a project issue" do
       put api("/projects/#{project.id}/issues/#{issue.iid}", user),
-        labels: 'label2', state_event: "close"
+        params: { labels: 'label2', state_event: "close" }
       expect(response).to have_gitlab_http_status(200)
 
       expect(json_response['labels']).to include 'label2'
@@ -1584,7 +1591,7 @@
     end
 
     it 'reopens a project isssue' do
-      put api("/projects/#{project.id}/issues/#{closed_issue.iid}", user), state_event: 'reopen'
+      put api("/projects/#{project.id}/issues/#{closed_issue.iid}", user), params: { state_event: 'reopen' }
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['state']).to eq 'opened'
@@ -1594,7 +1601,7 @@
       it 'accepts the update date to be set' do
         update_time = 2.weeks.ago
         put api("/projects/#{project.id}/issues/#{issue.iid}", user),
-          labels: 'label3', state_event: 'close', updated_at: update_time
+          params: { labels: 'label3', state_event: 'close', updated_at: update_time }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['labels']).to include 'label3'
@@ -1607,7 +1614,7 @@
     it 'creates a new project issue' do
       due_date = 2.weeks.from_now.strftime('%Y-%m-%d')
 
-      put api("/projects/#{project.id}/issues/#{issue.iid}", user), due_date: due_date
+      put api("/projects/#{project.id}/issues/#{issue.iid}", user), params: { due_date: due_date }
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['due_date']).to eq(due_date)
@@ -1661,7 +1668,7 @@
 
     it 'moves an issue' do
       post api("/projects/#{project.id}/issues/#{issue.iid}/move", user),
-               to_project_id: target_project.id
+               params: { to_project_id: target_project.id }
 
       expect(response).to have_gitlab_http_status(201)
       expect(json_response['project_id']).to eq(target_project.id)
@@ -1670,7 +1677,7 @@
     context 'when source and target projects are the same' do
       it 'returns 400 when trying to move an issue' do
         post api("/projects/#{project.id}/issues/#{issue.iid}/move", user),
-                 to_project_id: project.id
+                 params: { to_project_id: project.id }
 
         expect(response).to have_gitlab_http_status(400)
         expect(json_response['message']).to eq('Cannot move issue to project it originates from!')
@@ -1680,7 +1687,7 @@
     context 'when the user does not have the permission to move issues' do
       it 'returns 400 when trying to move an issue' do
         post api("/projects/#{project.id}/issues/#{issue.iid}/move", user),
-                 to_project_id: target_project2.id
+                 params: { to_project_id: target_project2.id }
 
         expect(response).to have_gitlab_http_status(400)
         expect(json_response['message']).to eq('Cannot move issue due to insufficient permissions!')
@@ -1689,7 +1696,7 @@
 
     it 'moves the issue to another namespace if I am admin' do
       post api("/projects/#{project.id}/issues/#{issue.iid}/move", admin),
-               to_project_id: target_project2.id
+               params: { to_project_id: target_project2.id }
 
       expect(response).to have_gitlab_http_status(201)
       expect(json_response['project_id']).to eq(target_project2.id)
@@ -1698,7 +1705,7 @@
     context 'when using the issue ID instead of iid' do
       it 'returns 404 when trying to move an issue' do
         post api("/projects/#{project.id}/issues/#{issue.id}/move", user),
-             to_project_id: target_project.id
+             params: { to_project_id: target_project.id }
 
         expect(response).to have_gitlab_http_status(404)
         expect(json_response['message']).to eq('404 Issue Not Found')
@@ -1708,7 +1715,7 @@
     context 'when issue does not exist' do
       it 'returns 404 when trying to move an issue' do
         post api("/projects/#{project.id}/issues/123/move", user),
-                 to_project_id: target_project.id
+                 params: { to_project_id: target_project.id }
 
         expect(response).to have_gitlab_http_status(404)
         expect(json_response['message']).to eq('404 Issue Not Found')
@@ -1718,7 +1725,7 @@
     context 'when source project does not exist' do
       it 'returns 404 when trying to move an issue' do
         post api("/projects/0/issues/#{issue.iid}/move", user),
-                 to_project_id: target_project.id
+                 params: { to_project_id: target_project.id }
 
         expect(response).to have_gitlab_http_status(404)
         expect(json_response['message']).to eq('404 Project Not Found')
@@ -1728,7 +1735,7 @@
     context 'when target project does not exist' do
       it 'returns 404 when trying to move an issue' do
         post api("/projects/#{project.id}/issues/#{issue.iid}/move", user),
-                 to_project_id: 0
+                 params: { to_project_id: 0 }
 
         expect(response).to have_gitlab_http_status(404)
       end
diff --git a/spec/requests/api/jobs_spec.rb b/spec/requests/api/jobs_spec.rb
index 9e27729f64f4e54988294df35069240435e2c109..8db60878777ef247333391e7ac5593b5a03a8d03 100644
--- a/spec/requests/api/jobs_spec.rb
+++ b/spec/requests/api/jobs_spec.rb
@@ -59,7 +59,7 @@
 
     before do |example|
       unless example.metadata[:skip_before_request]
-        get api("/projects/#{project.id}/jobs", api_user), query
+        get api("/projects/#{project.id}/jobs", api_user), params: query
       end
     end
 
@@ -151,7 +151,7 @@
     end
 
     def go
-      get api("/projects/#{project.id}/jobs", api_user), query
+      get api("/projects/#{project.id}/jobs", api_user), params: query
     end
   end
 
@@ -161,7 +161,7 @@ def go
     before do |example|
       unless example.metadata[:skip_before_request]
         job
-        get api("/projects/#{project.id}/pipelines/#{pipeline.id}/jobs", api_user), query
+        get api("/projects/#{project.id}/pipelines/#{pipeline.id}/jobs", api_user), params: query
       end
     end
 
@@ -230,13 +230,13 @@ def go
 
       it 'avoids N+1 queries' do
         control_count = ActiveRecord::QueryRecorder.new(skip_cached: false) do
-          get api("/projects/#{project.id}/pipelines/#{pipeline.id}/jobs", api_user), query
+          get api("/projects/#{project.id}/pipelines/#{pipeline.id}/jobs", api_user), params: query
         end.count
 
         3.times { create(:ci_build, :trace_artifact, :artifacts, :test_reports, pipeline: pipeline) }
 
         expect do
-          get api("/projects/#{project.id}/pipelines/#{pipeline.id}/jobs", api_user), query
+          get api("/projects/#{project.id}/pipelines/#{pipeline.id}/jobs", api_user), params: query
         end.not_to exceed_all_query_limit(control_count)
       end
     end
@@ -480,7 +480,7 @@ def get_artifact_file(artifact_path)
     end
 
     def get_for_ref(ref = pipeline.ref, job_name = job.name)
-      get api("/projects/#{project.id}/jobs/artifacts/#{ref}/download", api_user), job: job_name
+      get api("/projects/#{project.id}/jobs/artifacts/#{ref}/download", api_user), params: { job: job_name }
     end
 
     context 'when not logged in' do
@@ -736,7 +736,7 @@ def get_for_ref(ref = pipeline.ref, job_name = job.name)
     end
 
     def get_artifact_file(artifact_path, ref = pipeline.ref, job_name = job.name)
-      get api("/projects/#{project.id}/jobs/artifacts/#{ref}/raw/#{artifact_path}", api_user), job: job_name
+      get api("/projects/#{project.id}/jobs/artifacts/#{ref}/raw/#{artifact_path}", api_user), params: { job: job_name }
     end
   end
 
diff --git a/spec/requests/api/labels_spec.rb b/spec/requests/api/labels_spec.rb
index b8a4a04a7e4940e6dc2cb055707e45166a5b042f..49eea2e362b9889ad9298b43c65c646fe7144f90 100644
--- a/spec/requests/api/labels_spec.rb
+++ b/spec/requests/api/labels_spec.rb
@@ -70,10 +70,12 @@
   describe 'POST /projects/:id/labels' do
     it 'returns created label when all params' do
       post api("/projects/#{project.id}/labels", user),
-           name: 'Foo',
-           color: '#FFAABB',
-           description: 'test',
-           priority: 2
+           params: {
+             name: 'Foo',
+             color: '#FFAABB',
+             description: 'test',
+             priority: 2
+           }
 
       expect(response).to have_gitlab_http_status(201)
       expect(json_response['name']).to eq('Foo')
@@ -84,8 +86,10 @@
 
     it 'returns created label when only required params' do
       post api("/projects/#{project.id}/labels", user),
-           name: 'Foo & Bar',
-           color: '#FFAABB'
+           params: {
+             name: 'Foo & Bar',
+             color: '#FFAABB'
+           }
 
       expect(response.status).to eq(201)
       expect(json_response['name']).to eq('Foo & Bar')
@@ -96,9 +100,11 @@
 
     it 'creates a prioritized label' do
       post api("/projects/#{project.id}/labels", user),
-           name: 'Foo & Bar',
-           color: '#FFAABB',
-           priority: 3
+           params: {
+             name: 'Foo & Bar',
+             color: '#FFAABB',
+             priority: 3
+           }
 
       expect(response.status).to eq(201)
       expect(json_response['name']).to eq('Foo & Bar')
@@ -108,35 +114,41 @@
     end
 
     it 'returns a 400 bad request if name not given' do
-      post api("/projects/#{project.id}/labels", user), color: '#FFAABB'
+      post api("/projects/#{project.id}/labels", user), params: { color: '#FFAABB' }
       expect(response).to have_gitlab_http_status(400)
     end
 
     it 'returns a 400 bad request if color not given' do
-      post api("/projects/#{project.id}/labels", user), name: 'Foobar'
+      post api("/projects/#{project.id}/labels", user), params: { name: 'Foobar' }
       expect(response).to have_gitlab_http_status(400)
     end
 
     it 'returns 400 for invalid color' do
       post api("/projects/#{project.id}/labels", user),
-           name: 'Foo',
-           color: '#FFAA'
+           params: {
+             name: 'Foo',
+             color: '#FFAA'
+           }
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['message']['color']).to eq(['must be a valid color code'])
     end
 
     it 'returns 400 for too long color code' do
       post api("/projects/#{project.id}/labels", user),
-           name: 'Foo',
-           color: '#FFAAFFFF'
+           params: {
+             name: 'Foo',
+             color: '#FFAAFFFF'
+           }
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['message']['color']).to eq(['must be a valid color code'])
     end
 
     it 'returns 400 for invalid name' do
       post api("/projects/#{project.id}/labels", user),
-           name: ',',
-           color: '#FFAABB'
+           params: {
+             name: ',',
+             color: '#FFAABB'
+           }
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['message']['title']).to eq(['is invalid'])
     end
@@ -147,8 +159,10 @@
       project.update(group: group)
 
       post api("/projects/#{project.id}/labels", user),
-           name: group_label.name,
-           color: '#FFAABB'
+           params: {
+             name: group_label.name,
+             color: '#FFAABB'
+           }
 
       expect(response).to have_gitlab_http_status(409)
       expect(json_response['message']).to eq('Label already exists')
@@ -156,17 +170,21 @@
 
     it 'returns 400 for invalid priority' do
       post api("/projects/#{project.id}/labels", user),
-           name: 'Foo',
-           color: '#FFAAFFFF',
-           priority: 'foo'
+           params: {
+             name: 'Foo',
+             color: '#FFAAFFFF',
+             priority: 'foo'
+           }
 
       expect(response).to have_gitlab_http_status(400)
     end
 
     it 'returns 409 if label already exists in project' do
       post api("/projects/#{project.id}/labels", user),
-           name: 'label1',
-           color: '#FFAABB'
+           params: {
+             name: 'label1',
+             color: '#FFAABB'
+           }
       expect(response).to have_gitlab_http_status(409)
       expect(json_response['message']).to eq('Label already exists')
     end
@@ -174,13 +192,13 @@
 
   describe 'DELETE /projects/:id/labels' do
     it 'returns 204 for existing label' do
-      delete api("/projects/#{project.id}/labels", user), name: 'label1'
+      delete api("/projects/#{project.id}/labels", user), params: { name: 'label1' }
 
       expect(response).to have_gitlab_http_status(204)
     end
 
     it 'returns 404 for non existing label' do
-      delete api("/projects/#{project.id}/labels", user), name: 'label2'
+      delete api("/projects/#{project.id}/labels", user), params: { name: 'label2' }
       expect(response).to have_gitlab_http_status(404)
       expect(json_response['message']).to eq('404 Label Not Found')
     end
@@ -199,10 +217,12 @@
   describe 'PUT /projects/:id/labels' do
     it 'returns 200 if name and colors and description are changed' do
       put api("/projects/#{project.id}/labels", user),
-          name: 'label1',
-          new_name: 'New Label',
-          color: '#FFFFFF',
-          description: 'test'
+          params: {
+            name: 'label1',
+            new_name: 'New Label',
+            color: '#FFFFFF',
+            description: 'test'
+          }
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['name']).to eq('New Label')
       expect(json_response['color']).to eq('#FFFFFF')
@@ -211,8 +231,10 @@
 
     it 'returns 200 if name is changed' do
       put api("/projects/#{project.id}/labels", user),
-          name: 'label1',
-          new_name: 'New Label'
+          params: {
+            name: 'label1',
+            new_name: 'New Label'
+          }
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['name']).to eq('New Label')
       expect(json_response['color']).to eq(label1.color)
@@ -220,8 +242,10 @@
 
     it 'returns 200 if colors is changed' do
       put api("/projects/#{project.id}/labels", user),
-          name: 'label1',
-          color: '#FFFFFF'
+          params: {
+            name: 'label1',
+            color: '#FFFFFF'
+          }
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['name']).to eq(label1.name)
       expect(json_response['color']).to eq('#FFFFFF')
@@ -229,8 +253,10 @@
 
     it 'returns 200 if description is changed' do
       put api("/projects/#{project.id}/labels", user),
-          name: 'bug',
-          description: 'test'
+          params: {
+            name: 'bug',
+            description: 'test'
+          }
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['name']).to eq(priority_label.name)
@@ -240,8 +266,10 @@
 
     it 'returns 200 if priority is changed' do
       put api("/projects/#{project.id}/labels", user),
-           name: 'bug',
-           priority: 10
+           params: {
+             name: 'bug',
+             priority: 10
+           }
 
       expect(response.status).to eq(200)
       expect(json_response['name']).to eq(priority_label.name)
@@ -250,8 +278,10 @@
 
     it 'returns 200 if a priority is added' do
       put api("/projects/#{project.id}/labels", user),
-           name: 'label1',
-           priority: 3
+           params: {
+             name: 'label1',
+             priority: 3
+           }
 
       expect(response.status).to eq(200)
       expect(json_response['name']).to eq(label1.name)
@@ -260,8 +290,10 @@
 
     it 'returns 200 if the priority is removed' do
       put api("/projects/#{project.id}/labels", user),
-          name: priority_label.name,
-          priority: nil
+          params: {
+            name: priority_label.name,
+            priority: nil
+          }
 
       expect(response.status).to eq(200)
       expect(json_response['name']).to eq(priority_label.name)
@@ -270,19 +302,21 @@
 
     it 'returns 404 if label does not exist' do
       put api("/projects/#{project.id}/labels", user),
-          name: 'label2',
-          new_name: 'label3'
+          params: {
+            name: 'label2',
+            new_name: 'label3'
+          }
       expect(response).to have_gitlab_http_status(404)
     end
 
     it 'returns 400 if no label name given' do
-      put api("/projects/#{project.id}/labels", user), new_name: 'label2'
+      put api("/projects/#{project.id}/labels", user), params: { new_name: 'label2' }
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['error']).to eq('name is missing')
     end
 
     it 'returns 400 if no new parameters given' do
-      put api("/projects/#{project.id}/labels", user), name: 'label1'
+      put api("/projects/#{project.id}/labels", user), params: { name: 'label1' }
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['error']).to eq('new_name, color, description, priority are missing, '\
                                            'at least one parameter must be provided')
@@ -290,33 +324,41 @@
 
     it 'returns 400 for invalid name' do
       put api("/projects/#{project.id}/labels", user),
-          name: 'label1',
-          new_name: ',',
-          color: '#FFFFFF'
+          params: {
+            name: 'label1',
+            new_name: ',',
+            color: '#FFFFFF'
+          }
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['message']['title']).to eq(['is invalid'])
     end
 
     it 'returns 400 when color code is too short' do
       put api("/projects/#{project.id}/labels", user),
-          name: 'label1',
-          color: '#FF'
+          params: {
+            name: 'label1',
+            color: '#FF'
+          }
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['message']['color']).to eq(['must be a valid color code'])
     end
 
     it 'returns 400 for too long color code' do
       put api("/projects/#{project.id}/labels", user),
-           name: 'label1',
-           color: '#FFAAFFFF'
+           params: {
+             name: 'label1',
+             color: '#FFAAFFFF'
+           }
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['message']['color']).to eq(['must be a valid color code'])
     end
 
     it 'returns 400 for invalid priority' do
       put api("/projects/#{project.id}/labels", user),
-           name: 'label1',
-           priority: 'foo'
+           params: {
+             name: 'label1',
+             priority: 'foo'
+           }
 
       expect(response).to have_gitlab_http_status(400)
     end
diff --git a/spec/requests/api/lint_spec.rb b/spec/requests/api/lint_spec.rb
index e3065840e6fba1b0380738c8a0aff9bb82727574..f52cdf1c459920d2edfda0f10a4ce5ee35c14c23 100644
--- a/spec/requests/api/lint_spec.rb
+++ b/spec/requests/api/lint_spec.rb
@@ -8,7 +8,7 @@
       end
 
       it 'passes validation' do
-        post api('/ci/lint'), { content: yaml_content }
+        post api('/ci/lint'), params: { content: yaml_content }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response).to be_an Hash
@@ -19,7 +19,7 @@
 
     context 'with an invalid .gitlab_ci.yml' do
       it 'responds with errors about invalid syntax' do
-        post api('/ci/lint'), { content: 'invalid content' }
+        post api('/ci/lint'), params: { content: 'invalid content' }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['status']).to eq('invalid')
@@ -27,7 +27,7 @@
       end
 
       it "responds with errors about invalid configuration" do
-        post api('/ci/lint'), { content: '{ image: "ruby:2.1",  services: ["postgres"] }' }
+        post api('/ci/lint'), params: { content: '{ image: "ruby:2.1",  services: ["postgres"] }' }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['status']).to eq('invalid')
diff --git a/spec/requests/api/markdown_spec.rb b/spec/requests/api/markdown_spec.rb
index e369c1435f08f349de20b9b05e98de241e566c11..e82ef002d32f04e2b8612468949e5b1e749f722a 100644
--- a/spec/requests/api/markdown_spec.rb
+++ b/spec/requests/api/markdown_spec.rb
@@ -7,7 +7,7 @@
     let(:user) {} # No-op. It gets overwritten in the contexts below.
 
     before do
-      post api("/markdown", user), params
+      post api("/markdown", user), params: params
     end
 
     shared_examples "rendered markdown text without GFM" do
diff --git a/spec/requests/api/members_spec.rb b/spec/requests/api/members_spec.rb
index 5f528514296a3c9e356e913a0840eb511e55acb1..66b1d4adc0323805f5fec6d76c52a0584fc6ae6f 100644
--- a/spec/requests/api/members_spec.rb
+++ b/spec/requests/api/members_spec.rb
@@ -78,7 +78,7 @@
       end
 
       it 'finds members with query string' do
-        get api(members_url, developer), query: maintainer.username
+        get api(members_url, developer), params: { query: maintainer.username }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to include_pagination_headers
@@ -88,7 +88,7 @@
       end
 
       it 'finds all members with no query specified' do
-        get api(members_url, developer), query: ''
+        get api(members_url, developer), params: { query: '' }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to include_pagination_headers
@@ -178,7 +178,7 @@
       it_behaves_like 'a 404 response when source is private' do
         let(:route) do
           post api("/#{source_type.pluralize}/#{source.id}/members", stranger),
-               user_id: access_requester.id, access_level: Member::MAINTAINER
+               params: { user_id: access_requester.id, access_level: Member::MAINTAINER }
         end
       end
 
@@ -188,7 +188,7 @@
             it 'returns 403' do
               user = public_send(type)
               post api("/#{source_type.pluralize}/#{source.id}/members", user),
-                   user_id: access_requester.id, access_level: Member::MAINTAINER
+                   params: { user_id: access_requester.id, access_level: Member::MAINTAINER }
 
               expect(response).to have_gitlab_http_status(403)
             end
@@ -201,7 +201,7 @@
           it 'transforms the requester into a proper member' do
             expect do
               post api("/#{source_type.pluralize}/#{source.id}/members", maintainer),
-                   user_id: access_requester.id, access_level: Member::MAINTAINER
+                   params: { user_id: access_requester.id, access_level: Member::MAINTAINER }
 
               expect(response).to have_gitlab_http_status(201)
             end.to change { source.members.count }.by(1)
@@ -214,7 +214,7 @@
         it 'creates a new member' do
           expect do
             post api("/#{source_type.pluralize}/#{source.id}/members", maintainer),
-                 user_id: stranger.id, access_level: Member::DEVELOPER, expires_at: '2016-08-05'
+                 params: { user_id: stranger.id, access_level: Member::DEVELOPER, expires_at: '2016-08-05' }
 
             expect(response).to have_gitlab_http_status(201)
           end.to change { source.members.count }.by(1)
@@ -233,7 +233,7 @@
           parent.add_developer(stranger)
 
           post api("/#{source_type.pluralize}/#{source.id}/members", maintainer),
-               user_id: stranger.id, access_level: Member::REPORTER
+               params: { user_id: stranger.id, access_level: Member::REPORTER }
 
           expect(response).to have_gitlab_http_status(400)
           expect(json_response['message']['access_level']).to eq(["should be higher than Developer inherited membership from group #{parent.name}"])
@@ -247,7 +247,7 @@
           parent.add_developer(stranger)
 
           post api("/#{source_type.pluralize}/#{source.id}/members", maintainer),
-               user_id: stranger.id, access_level: Member::MAINTAINER
+               params: { user_id: stranger.id, access_level: Member::MAINTAINER }
 
           expect(response).to have_gitlab_http_status(201)
           expect(json_response['id']).to eq(stranger.id)
@@ -257,14 +257,14 @@
 
       it "returns 409 if member already exists" do
         post api("/#{source_type.pluralize}/#{source.id}/members", maintainer),
-             user_id: maintainer.id, access_level: Member::MAINTAINER
+             params: { user_id: maintainer.id, access_level: Member::MAINTAINER }
 
         expect(response).to have_gitlab_http_status(409)
       end
 
       it 'returns 404 when the user_id is not valid' do
         post api("/#{source_type.pluralize}/#{source.id}/members", maintainer),
-             user_id: 0, access_level: Member::MAINTAINER
+             params: { user_id: 0, access_level: Member::MAINTAINER }
 
         expect(response).to have_gitlab_http_status(404)
         expect(json_response['message']).to eq('404 User Not Found')
@@ -272,21 +272,21 @@
 
       it 'returns 400 when user_id is not given' do
         post api("/#{source_type.pluralize}/#{source.id}/members", maintainer),
-             access_level: Member::MAINTAINER
+             params: { access_level: Member::MAINTAINER }
 
         expect(response).to have_gitlab_http_status(400)
       end
 
       it 'returns 400 when access_level is not given' do
         post api("/#{source_type.pluralize}/#{source.id}/members", maintainer),
-             user_id: stranger.id
+             params: { user_id: stranger.id }
 
         expect(response).to have_gitlab_http_status(400)
       end
 
       it 'returns 400  when access_level is not valid' do
         post api("/#{source_type.pluralize}/#{source.id}/members", maintainer),
-             user_id: stranger.id, access_level: 1234
+             params: { user_id: stranger.id, access_level: 1234 }
 
         expect(response).to have_gitlab_http_status(400)
       end
@@ -315,7 +315,7 @@
       it_behaves_like 'a 404 response when source is private' do
         let(:route) do
           put api("/#{source_type.pluralize}/#{source.id}/members/#{developer.id}", stranger),
-              access_level: Member::MAINTAINER
+              params: { access_level: Member::MAINTAINER }
         end
       end
 
@@ -325,7 +325,7 @@
             it 'returns 403' do
               user = public_send(type)
               put api("/#{source_type.pluralize}/#{source.id}/members/#{developer.id}", user),
-                  access_level: Member::MAINTAINER
+                  params: { access_level: Member::MAINTAINER }
 
               expect(response).to have_gitlab_http_status(403)
             end
@@ -336,7 +336,7 @@
       context 'when authenticated as a maintainer/owner' do
         it 'updates the member' do
           put api("/#{source_type.pluralize}/#{source.id}/members/#{developer.id}", maintainer),
-              access_level: Member::MAINTAINER, expires_at: '2016-08-05'
+              params: { access_level: Member::MAINTAINER, expires_at: '2016-08-05' }
 
           expect(response).to have_gitlab_http_status(200)
           expect(json_response['id']).to eq(developer.id)
@@ -347,7 +347,7 @@
 
       it 'returns 409 if member does not exist' do
         put api("/#{source_type.pluralize}/#{source.id}/members/123", maintainer),
-            access_level: Member::MAINTAINER
+            params: { access_level: Member::MAINTAINER }
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -360,7 +360,7 @@
 
       it 'returns 400  when access level is not valid' do
         put api("/#{source_type.pluralize}/#{source.id}/members/#{developer.id}", maintainer),
-            access_level: 1234
+            params: { access_level: 1234 }
 
         expect(response).to have_gitlab_http_status(400)
       end
@@ -478,7 +478,7 @@
     it 'returns 403' do
       expect do
         post api("/projects/#{project.id}/members", maintainer),
-             user_id: stranger.id, access_level: Member::OWNER
+             params: { user_id: stranger.id, access_level: Member::OWNER }
 
         expect(response).to have_gitlab_http_status(400)
       end.to change { project.members.count }.by(0)
diff --git a/spec/requests/api/merge_requests_spec.rb b/spec/requests/api/merge_requests_spec.rb
index efe9a2b5a28f7321ad268ae5449e4d9162337446..b8661f0b3d6f7de78f5a32d5abe957a271b9b5fb 100644
--- a/spec/requests/api/merge_requests_spec.rb
+++ b/spec/requests/api/merge_requests_spec.rb
@@ -45,7 +45,7 @@
   describe 'GET /merge_requests' do
     context 'when unauthenticated' do
       it 'returns an array of all merge requests' do
-        get api('/merge_requests', user), scope: 'all'
+        get api('/merge_requests', user), params: { scope: 'all' }
 
         expect_paginated_array_response
       end
@@ -57,19 +57,19 @@
       end
 
       it "returns authentication error  when scope is assigned-to-me" do
-        get api("/merge_requests"), scope: 'assigned-to-me'
+        get api("/merge_requests"), params: { scope: 'assigned-to-me' }
 
         expect(response).to have_gitlab_http_status(401)
       end
 
       it "returns authentication error when scope is assigned_to_me" do
-        get api("/merge_requests"), scope: 'assigned_to_me'
+        get api("/merge_requests"), params: { scope: 'assigned_to_me' }
 
         expect(response).to have_gitlab_http_status(401)
       end
 
       it "returns authentication error  when scope is created-by-me" do
-        get api("/merge_requests"), scope: 'created-by-me'
+        get api("/merge_requests"), params: { scope: 'created-by-me' }
 
         expect(response).to have_gitlab_http_status(401)
       end
@@ -81,7 +81,7 @@
       let(:user2) { create(:user) }
 
       it 'returns an array of all merge requests except unauthorized ones' do
-        get api('/merge_requests', user), scope: :all
+        get api('/merge_requests', user), params: { scope: :all }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to include_pagination_headers
@@ -91,7 +91,7 @@
       end
 
       it "returns an array of no merge_requests when wip=yes" do
-        get api("/merge_requests", user), wip: 'yes'
+        get api("/merge_requests", user), params: { wip: 'yes' }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to include_pagination_headers
@@ -100,7 +100,7 @@
       end
 
       it "returns an array of no merge_requests when wip=no" do
-        get api("/merge_requests", user), wip: 'no'
+        get api("/merge_requests", user), params: { wip: 'no' }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to include_pagination_headers
@@ -113,7 +113,7 @@
         private_project = create(:project, :private)
         merge_request3 = create(:merge_request, :simple, source_project: private_project, target_project: private_project, source_branch: 'other-branch')
 
-        get api('/merge_requests', user), scope: :all
+        get api('/merge_requests', user), params: { scope: :all }
 
         expect_response_contain_exactly(merge_request2, merge_request_merged, merge_request_closed, merge_request, merge_request_locked)
         expect(json_response.map { |mr| mr['id'] }).not_to include(merge_request3.id)
@@ -130,7 +130,7 @@
       it 'returns an array of merge requests authored by the given user' do
         merge_request3 = create(:merge_request, :simple, author: user2, assignee: user, source_project: project2, target_project: project2, source_branch: 'other-branch')
 
-        get api('/merge_requests', user), author_id: user2.id, scope: :all
+        get api('/merge_requests', user), params: { author_id: user2.id, scope: :all }
 
         expect_response_ordered_exactly(merge_request3)
       end
@@ -138,7 +138,7 @@
       it 'returns an array of merge requests assigned to the given user' do
         merge_request3 = create(:merge_request, :simple, author: user, assignee: user2, source_project: project2, target_project: project2, source_branch: 'other-branch')
 
-        get api('/merge_requests', user), assignee_id: user2.id, scope: :all
+        get api('/merge_requests', user), params: { assignee_id: user2.id, scope: :all }
 
         expect_response_ordered_exactly(merge_request3)
       end
@@ -146,7 +146,7 @@
       it 'returns an array of merge requests with no assignee' do
         merge_request3 = create(:merge_request, :simple, author: user, source_project: project2, target_project: project2, source_branch: 'other-branch')
 
-        get api('/merge_requests', user), assignee_id: 'None', scope: :all
+        get api('/merge_requests', user), params: { assignee_id: 'None', scope: :all }
 
         expect_response_ordered_exactly(merge_request3)
       end
@@ -155,7 +155,7 @@
         # This MR with no assignee should not be returned
         create(:merge_request, :simple, author: user, source_project: project2, target_project: project2, source_branch: 'other-branch')
 
-        get api('/merge_requests', user), assignee_id: 'Any', scope: :all
+        get api('/merge_requests', user), params: { assignee_id: 'Any', scope: :all }
 
         expect_response_contain_exactly(merge_request, merge_request2, merge_request_closed, merge_request_merged, merge_request_locked)
       end
@@ -163,7 +163,7 @@
       it 'returns an array of merge requests assigned to me' do
         merge_request3 = create(:merge_request, :simple, author: user, assignee: user2, source_project: project2, target_project: project2, source_branch: 'other-branch')
 
-        get api('/merge_requests', user2), scope: 'assigned_to_me'
+        get api('/merge_requests', user2), params: { scope: 'assigned_to_me' }
 
         expect_response_ordered_exactly(merge_request3)
       end
@@ -171,7 +171,7 @@
       it 'returns an array of merge requests assigned to me (kebab-case)' do
         merge_request3 = create(:merge_request, :simple, author: user, assignee: user2, source_project: project2, target_project: project2, source_branch: 'other-branch')
 
-        get api('/merge_requests', user2), scope: 'assigned-to-me'
+        get api('/merge_requests', user2), params: { scope: 'assigned-to-me' }
 
         expect_response_ordered_exactly(merge_request3)
       end
@@ -179,7 +179,7 @@
       it 'returns an array of merge requests created by me' do
         merge_request3 = create(:merge_request, :simple, author: user2, assignee: user, source_project: project2, target_project: project2, source_branch: 'other-branch')
 
-        get api('/merge_requests', user2), scope: 'created_by_me'
+        get api('/merge_requests', user2), params: { scope: 'created_by_me' }
 
         expect_response_ordered_exactly(merge_request3)
       end
@@ -187,7 +187,7 @@
       it 'returns an array of merge requests created by me (kebab-case)' do
         merge_request3 = create(:merge_request, :simple, author: user2, assignee: user, source_project: project2, target_project: project2, source_branch: 'other-branch')
 
-        get api('/merge_requests', user2), scope: 'created-by-me'
+        get api('/merge_requests', user2), params: { scope: 'created-by-me' }
 
         expect_response_ordered_exactly(merge_request3)
       end
@@ -196,14 +196,14 @@
         merge_request3 = create(:merge_request, :simple, author: user, assignee: user, source_project: project2, target_project: project2, source_branch: 'other-branch')
         award_emoji = create(:award_emoji, awardable: merge_request3, user: user2, name: 'star')
 
-        get api('/merge_requests', user2), my_reaction_emoji: award_emoji.name, scope: 'all'
+        get api('/merge_requests', user2), params: { my_reaction_emoji: award_emoji.name, scope: 'all' }
 
         expect_response_ordered_exactly(merge_request3)
       end
 
       context 'source_branch param' do
         it 'returns merge requests with the given source branch' do
-          get api('/merge_requests', user), source_branch: merge_request_closed.source_branch, state: 'all'
+          get api('/merge_requests', user), params: { source_branch: merge_request_closed.source_branch, state: 'all' }
 
           expect_response_contain_exactly(merge_request_closed, merge_request_merged, merge_request_locked)
         end
@@ -211,7 +211,7 @@
 
       context 'target_branch param' do
         it 'returns merge requests with the given target branch' do
-          get api('/merge_requests', user), target_branch: merge_request_closed.target_branch, state: 'all'
+          get api('/merge_requests', user), params: { target_branch: merge_request_closed.target_branch, state: 'all' }
 
           expect_response_contain_exactly(merge_request_closed, merge_request_merged, merge_request_locked)
         end
@@ -255,13 +255,13 @@
         end
 
         it 'returns merge requests matching given search string for title' do
-          get api("/merge_requests", user), search: merge_request.title
+          get api("/merge_requests", user), params: { search: merge_request.title }
 
           expect_response_ordered_exactly(merge_request)
         end
 
         it 'returns merge requests for project matching given search string for description' do
-          get api("/merge_requests", user), project_id: project.id, search: merge_request.description
+          get api("/merge_requests", user), params: { project_id: project.id, search: merge_request.description }
 
           expect_response_ordered_exactly(merge_request)
         end
@@ -269,7 +269,7 @@
 
       context 'state param' do
         it 'returns merge requests with the given state' do
-          get api('/merge_requests', user), state: 'locked'
+          get api('/merge_requests', user), params: { state: 'locked' }
 
           expect_response_contain_exactly(merge_request_locked)
         end
@@ -291,7 +291,7 @@
     end
 
     it "returns an array of no merge_requests when wip=yes" do
-      get api("/projects/#{project.id}/merge_requests", user), wip: 'yes'
+      get api("/projects/#{project.id}/merge_requests", user), params: { wip: 'yes' }
 
       expect(response).to have_gitlab_http_status(200)
       expect(response).to include_pagination_headers
@@ -300,7 +300,7 @@
     end
 
     it 'returns merge_request by "iids" array' do
-      get api(endpoint_path, user), iids: [merge_request.iid, merge_request_closed.iid]
+      get api(endpoint_path, user), params: { iids: [merge_request.iid, merge_request_closed.iid] }
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response).to be_an Array
@@ -364,7 +364,7 @@
     end
 
     it 'exposes description and title html when render_html is true' do
-      get api("/projects/#{project.id}/merge_requests/#{merge_request.iid}", user), render_html: true
+      get api("/projects/#{project.id}/merge_requests/#{merge_request.iid}", user), params: { render_html: true }
 
       expect(response).to have_gitlab_http_status(200)
 
@@ -372,7 +372,7 @@
     end
 
     it 'exposes rebase_in_progress when include_rebase_in_progress is true' do
-      get api("/projects/#{project.id}/merge_requests/#{merge_request.iid}", user), include_rebase_in_progress: true
+      get api("/projects/#{project.id}/merge_requests/#{merge_request.iid}", user), params: { include_rebase_in_progress: true }
 
       expect(response).to have_gitlab_http_status(200)
 
@@ -421,7 +421,7 @@
     it 'returns the commits behind the target branch when include_diverged_commits_count is present' do
       allow_any_instance_of(merge_request.class).to receive(:diverged_commits_count).and_return(1)
 
-      get api("/projects/#{project.id}/merge_requests/#{merge_request.iid}", user), include_diverged_commits_count: true
+      get api("/projects/#{project.id}/merge_requests/#{merge_request.iid}", user), params: { include_diverged_commits_count: true }
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['diverged_commits_count']).to eq(1)
@@ -587,13 +587,15 @@
     context 'between branches projects' do
       it "returns merge_request" do
         post api("/projects/#{project.id}/merge_requests", user),
-             title: 'Test merge_request',
-             source_branch: 'feature_conflict',
-             target_branch: 'master',
-             author: user,
-             labels: 'label, label2',
-             milestone_id: milestone.id,
-             squash: true
+             params: {
+               title: 'Test merge_request',
+               source_branch: 'feature_conflict',
+               target_branch: 'master',
+               author: user,
+               labels: 'label, label2',
+               milestone_id: milestone.id,
+               squash: true
+             }
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['title']).to eq('Test merge_request')
@@ -605,35 +607,37 @@
 
       it "returns 422 when source_branch equals target_branch" do
         post api("/projects/#{project.id}/merge_requests", user),
-        title: "Test merge_request", source_branch: "master", target_branch: "master", author: user
+        params: { title: "Test merge_request", source_branch: "master", target_branch: "master", author: user }
         expect(response).to have_gitlab_http_status(422)
       end
 
       it "returns 400 when source_branch is missing" do
         post api("/projects/#{project.id}/merge_requests", user),
-        title: "Test merge_request", target_branch: "master", author: user
+        params: { title: "Test merge_request", target_branch: "master", author: user }
         expect(response).to have_gitlab_http_status(400)
       end
 
       it "returns 400 when target_branch is missing" do
         post api("/projects/#{project.id}/merge_requests", user),
-        title: "Test merge_request", source_branch: "markdown", author: user
+        params: { title: "Test merge_request", source_branch: "markdown", author: user }
         expect(response).to have_gitlab_http_status(400)
       end
 
       it "returns 400 when title is missing" do
         post api("/projects/#{project.id}/merge_requests", user),
-        target_branch: 'master', source_branch: 'markdown'
+        params: { target_branch: 'master', source_branch: 'markdown' }
         expect(response).to have_gitlab_http_status(400)
       end
 
       it 'allows special label names' do
         post api("/projects/#{project.id}/merge_requests", user),
-             title: 'Test merge_request',
-             source_branch: 'markdown',
-             target_branch: 'master',
-             author: user,
-             labels: 'label, label?, label&foo, ?, &'
+             params: {
+               title: 'Test merge_request',
+               source_branch: 'markdown',
+               target_branch: 'master',
+               author: user,
+               labels: 'label, label?, label&foo, ?, &'
+             }
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['labels']).to include 'label'
         expect(json_response['labels']).to include 'label?'
@@ -645,20 +649,24 @@
       context 'with existing MR' do
         before do
           post api("/projects/#{project.id}/merge_requests", user),
-               title: 'Test merge_request',
-               source_branch: 'feature_conflict',
-               target_branch: 'master',
-               author: user
+               params: {
+                 title: 'Test merge_request',
+                 source_branch: 'feature_conflict',
+                 target_branch: 'master',
+                 author: user
+               }
           @mr = MergeRequest.all.last
         end
 
         it 'returns 409 when MR already exists for source/target' do
           expect do
             post api("/projects/#{project.id}/merge_requests", user),
-                 title: 'New test merge_request',
-                 source_branch: 'feature_conflict',
-                 target_branch: 'master',
-                 author: user
+                 params: {
+                   title: 'New test merge_request',
+                   source_branch: 'feature_conflict',
+                   target_branch: 'master',
+                   author: user
+                 }
           end.to change { MergeRequest.count }.by(0)
           expect(response).to have_gitlab_http_status(409)
         end
@@ -673,13 +681,13 @@
         end
 
         it 'sets force_remove_source_branch to false' do
-          post api("/projects/#{project.id}/merge_requests", user), params.merge(remove_source_branch: false)
+          post api("/projects/#{project.id}/merge_requests", user), params: params.merge(remove_source_branch: false)
 
           expect(json_response['force_remove_source_branch']).to be_falsy
         end
 
         it 'sets force_remove_source_branch to true' do
-          post api("/projects/#{project.id}/merge_requests", user), params.merge(remove_source_branch: true)
+          post api("/projects/#{project.id}/merge_requests", user), params: params.merge(remove_source_branch: true)
 
           expect(json_response['force_remove_source_branch']).to be_truthy
         end
@@ -698,8 +706,7 @@
 
       it "returns merge_request" do
         post api("/projects/#{forked_project.id}/merge_requests", user2),
-          title: 'Test merge_request', source_branch: "feature_conflict", target_branch: "master",
-          author: user2, target_project_id: project.id, description: 'Test description for Test merge_request'
+          params: { title: 'Test merge_request', source_branch: "feature_conflict", target_branch: "master", author: user2, target_project_id: project.id, description: 'Test description for Test merge_request' }
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['title']).to eq('Test merge_request')
         expect(json_response['description']).to eq('Test description for Test merge_request')
@@ -710,7 +717,7 @@
         expect(forked_project.forked?).to be_truthy
         expect(forked_project.forked_from_project).to eq(project)
         post api("/projects/#{forked_project.id}/merge_requests", user2),
-        title: 'Test merge_request', source_branch: "master", target_branch: "master", author: user2, target_project_id: project.id
+        params: { title: 'Test merge_request', source_branch: "master", target_branch: "master", author: user2, target_project_id: project.id }
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['title']).to eq('Test merge_request')
       end
@@ -719,37 +726,38 @@
         project.project_feature.update(merge_requests_access_level: 0)
 
         post api("/projects/#{forked_project.id}/merge_requests", user2),
-             title: 'Test',
-             target_branch: 'master',
-             source_branch: 'markdown',
-             author: user2,
-             target_project_id: project.id
+             params: {
+               title: 'Test',
+               target_branch: 'master',
+               source_branch: 'markdown',
+               author: user2,
+               target_project_id: project.id
+             }
 
         expect(response).to have_gitlab_http_status(403)
       end
 
       it "returns 400 when source_branch is missing" do
         post api("/projects/#{forked_project.id}/merge_requests", user2),
-        title: 'Test merge_request', target_branch: "master", author: user2, target_project_id: project.id
+        params: { title: 'Test merge_request', target_branch: "master", author: user2, target_project_id: project.id }
         expect(response).to have_gitlab_http_status(400)
       end
 
       it "returns 400 when target_branch is missing" do
         post api("/projects/#{forked_project.id}/merge_requests", user2),
-        title: 'Test merge_request', target_branch: "master", author: user2, target_project_id: project.id
+        params: { title: 'Test merge_request', target_branch: "master", author: user2, target_project_id: project.id }
         expect(response).to have_gitlab_http_status(400)
       end
 
       it "returns 400 when title is missing" do
         post api("/projects/#{forked_project.id}/merge_requests", user2),
-        target_branch: 'master', source_branch: 'markdown', author: user2, target_project_id: project.id
+        params: { target_branch: 'master', source_branch: 'markdown', author: user2, target_project_id: project.id }
         expect(response).to have_gitlab_http_status(400)
       end
 
       it 'allows setting `allow_collaboration`' do
         post api("/projects/#{forked_project.id}/merge_requests", user2),
-             title: 'Test merge_request', source_branch: "feature_conflict", target_branch: "master",
-             author: user2, target_project_id: project.id, allow_collaboration: true
+             params: { title: 'Test merge_request', source_branch: "feature_conflict", target_branch: "master", author: user2, target_project_id: project.id, allow_collaboration: true }
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['allow_collaboration']).to be_truthy
         expect(json_response['allow_maintainer_to_push']).to be_truthy
@@ -767,13 +775,13 @@
         it 'returns 422 if targeting a different fork' do
           unrelated_project.add_developer(user2)
 
-          post api("/projects/#{forked_project.id}/merge_requests", user2), params
+          post api("/projects/#{forked_project.id}/merge_requests", user2), params: params
 
           expect(response).to have_gitlab_http_status(422)
         end
 
         it 'returns 403 if targeting a different fork which user can not access' do
-          post api("/projects/#{forked_project.id}/merge_requests", user2), params
+          post api("/projects/#{forked_project.id}/merge_requests", user2), params: params
 
           expect(response).to have_gitlab_http_status(403)
         end
@@ -781,7 +789,7 @@
 
       it "returns 201 when target_branch is specified and for the same project" do
         post api("/projects/#{forked_project.id}/merge_requests", user2),
-        title: 'Test merge_request', target_branch: 'master', source_branch: 'markdown', author: user2, target_project_id: forked_project.id
+        params: { title: 'Test merge_request', target_branch: 'master', source_branch: 'markdown', author: user2, target_project_id: forked_project.id }
         expect(response).to have_gitlab_http_status(201)
       end
     end
@@ -898,21 +906,21 @@
     end
 
     it "returns 409 if the SHA parameter doesn't match" do
-      put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/merge", user), sha: merge_request.diff_head_sha.reverse
+      put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/merge", user), params: { sha: merge_request.diff_head_sha.reverse }
 
       expect(response).to have_gitlab_http_status(409)
       expect(json_response['message']).to start_with('SHA does not match HEAD of source branch')
     end
 
     it "succeeds if the SHA parameter matches" do
-      put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/merge", user), sha: merge_request.diff_head_sha
+      put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/merge", user), params: { sha: merge_request.diff_head_sha }
 
       expect(response).to have_gitlab_http_status(200)
     end
 
     it "updates the MR's squash attribute" do
       expect do
-        put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/merge", user), squash: true
+        put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/merge", user), params: { squash: true }
       end.to change { merge_request.reload.squash }
 
       expect(response).to have_gitlab_http_status(200)
@@ -922,7 +930,7 @@
       allow_any_instance_of(MergeRequest).to receive(:head_pipeline).and_return(pipeline)
       allow(pipeline).to receive(:active?).and_return(true)
 
-      put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/merge", user), merge_when_pipeline_succeeds: true
+      put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/merge", user), params: { merge_when_pipeline_succeeds: true }
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['title']).to eq('Test')
@@ -934,7 +942,7 @@
       allow(pipeline).to receive(:active?).and_return(true)
       project.update_attribute(:only_allow_merge_if_pipeline_succeeds, true)
 
-      put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/merge", user), merge_when_pipeline_succeeds: true
+      put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/merge", user), params: { merge_when_pipeline_succeeds: true }
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['title']).to eq('Test')
@@ -957,7 +965,7 @@
   describe "PUT /projects/:id/merge_requests/:merge_request_iid" do
     context "to close a MR" do
       it "returns merge_request" do
-        put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}", user), state_event: "close"
+        put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}", user), params: { state_event: "close" }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['state']).to eq('closed')
@@ -965,38 +973,38 @@
     end
 
     it "updates title and returns merge_request" do
-      put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}", user), title: "New title"
+      put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}", user), params: { title: "New title" }
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['title']).to eq('New title')
     end
 
     it "updates description and returns merge_request" do
-      put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}", user), description: "New description"
+      put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}", user), params: { description: "New description" }
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['description']).to eq('New description')
     end
 
     it "updates milestone_id and returns merge_request" do
-      put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}", user), milestone_id: milestone.id
+      put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}", user), params: { milestone_id: milestone.id }
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['milestone']['id']).to eq(milestone.id)
     end
 
     it "updates squash and returns merge_request" do
-      put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}", user), squash: true
+      put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}", user), params: { squash: true }
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['squash']).to be_truthy
     end
 
     it "returns merge_request with renamed target_branch" do
-      put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}", user), target_branch: "wiki"
+      put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}", user), params: { target_branch: "wiki" }
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['target_branch']).to eq('wiki')
     end
 
     it "returns merge_request that removes the source branch" do
-      put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}", user), remove_source_branch: true
+      put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}", user), params: { remove_source_branch: true }
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['force_remove_source_branch']).to be_truthy
@@ -1004,8 +1012,10 @@
 
     it 'allows special label names' do
       put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}", user),
-        title: 'new issue',
-        labels: 'label, label?, label&foo, ?, &'
+        params: {
+          title: 'new issue',
+          labels: 'label, label?, label&foo, ?, &'
+        }
 
       expect(response.status).to eq(200)
       expect(json_response['labels']).to include 'label'
@@ -1016,7 +1026,7 @@
     end
 
     it 'does not update state when title is empty' do
-      put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}", user), state_event: 'close', title: nil
+      put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}", user), params: { state_event: 'close', title: nil }
 
       merge_request.reload
       expect(response).to have_gitlab_http_status(400)
@@ -1024,7 +1034,7 @@
     end
 
     it 'does not update state when target_branch is empty' do
-      put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}", user), state_event: 'close', target_branch: nil
+      put api("/projects/#{project.id}/merge_requests/#{merge_request.iid}", user), params: { state_event: 'close', target_branch: nil }
 
       merge_request.reload
       expect(response).to have_gitlab_http_status(400)
@@ -1032,13 +1042,13 @@
     end
 
     it "returns 404 for an invalid merge request IID" do
-      put api("/projects/#{project.id}/merge_requests/12345", user), state_event: "close"
+      put api("/projects/#{project.id}/merge_requests/12345", user), params: { state_event: "close" }
 
       expect(response).to have_gitlab_http_status(404)
     end
 
     it "returns 404 if the merge request id is used instead of iid" do
-      put api("/projects/#{project.id}/merge_requests/#{merge_request.id}", user), state_event: "close"
+      put api("/projects/#{project.id}/merge_requests/#{merge_request.id}", user), params: { state_event: "close" }
 
       expect(response).to have_gitlab_http_status(404)
     end
diff --git a/spec/requests/api/notes_spec.rb b/spec/requests/api/notes_spec.rb
index aca2a4891a51102bb48637495d9047860d53127f..e6fc8b82caffe017d2f0631ceb25892c60471d97 100644
--- a/spec/requests/api/notes_spec.rb
+++ b/spec/requests/api/notes_spec.rb
@@ -28,7 +28,7 @@
       #
       before do
         post api("/projects/#{private_issue.project.id}/issues/#{private_issue.iid}/notes", user),
-             body: 'Hi!'
+             params: { body: 'Hi!' }
       end
 
       it 'responds with resource not found error' do
@@ -154,7 +154,7 @@
       end
 
       context 'when a user is a team member' do
-        subject { post api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/notes", user), body: 'Hi!' }
+        subject { post api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/notes", user), params: { body: 'Hi!' } }
 
         it 'returns 200 status' do
           subject
@@ -168,7 +168,7 @@
       end
 
       context 'when a user is not a team member' do
-        subject { post api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/notes", private_user), body: 'Hi!' }
+        subject { post api("/projects/#{project.id}/merge_requests/#{merge_request.iid}/notes", private_user), params: { body: 'Hi!' } }
 
         it 'returns 403 status' do
           subject
diff --git a/spec/requests/api/notification_settings_spec.rb b/spec/requests/api/notification_settings_spec.rb
index 3273cd266908688749ca1de6cda95b239019973b..4ed667ad0dc710cbe398803caecb14a141721c3b 100644
--- a/spec/requests/api/notification_settings_spec.rb
+++ b/spec/requests/api/notification_settings_spec.rb
@@ -20,7 +20,7 @@
     let(:email) { create(:email, user: user) }
 
     it "updates global notification settings for the current user" do
-      put api("/notification_settings", user), { level: 'watch', notification_email: email.email }
+      put api("/notification_settings", user), params: { level: 'watch', notification_email: email.email }
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['notification_email']).to eq(email.email)
@@ -31,7 +31,7 @@
 
   describe "PUT /notification_settings" do
     it "fails on non-user email address" do
-      put api("/notification_settings", user), { notification_email: 'invalid@example.com' }
+      put api("/notification_settings", user), params: { notification_email: 'invalid@example.com' }
 
       expect(response).to have_gitlab_http_status(400)
     end
@@ -49,7 +49,7 @@
 
   describe "PUT /groups/:id/notification_settings" do
     it "updates group level notification settings for the current user" do
-      put api("/groups/#{group.id}/notification_settings", user), { level: 'watch' }
+      put api("/groups/#{group.id}/notification_settings", user), params: { level: 'watch' }
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['level']).to eq(user.reload.notification_settings_for(group).level)
@@ -68,7 +68,7 @@
 
   describe "PUT /projects/:id/notification_settings" do
     it "updates project level notification settings for the current user" do
-      put api("/projects/#{project.id}/notification_settings", user), { level: 'custom', new_note: true }
+      put api("/projects/#{project.id}/notification_settings", user), params: { level: 'custom', new_note: true }
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['level']).to eq(user.reload.notification_settings_for(project).level)
@@ -79,7 +79,7 @@
 
   describe "PUT /projects/:id/notification_settings" do
     it "fails on invalid level" do
-      put api("/projects/#{project.id}/notification_settings", user), { level: 'invalid' }
+      put api("/projects/#{project.id}/notification_settings", user), params: { level: 'invalid' }
 
       expect(response).to have_gitlab_http_status(400)
     end
diff --git a/spec/requests/api/oauth_tokens_spec.rb b/spec/requests/api/oauth_tokens_spec.rb
index bdda80cc229d04f543162b4d591d8468538be2bd..3811ec751de4d75485e75c9a6c1276dc568fde9a 100644
--- a/spec/requests/api/oauth_tokens_spec.rb
+++ b/spec/requests/api/oauth_tokens_spec.rb
@@ -3,7 +3,7 @@
 describe 'OAuth tokens' do
   context 'Resource Owner Password Credentials' do
     def request_oauth_token(user)
-      post '/oauth/token', username: user.username, password: user.password, grant_type: 'password'
+      post '/oauth/token', params: { username: user.username, password: user.password, grant_type: 'password' }
     end
 
     context 'when user has 2FA enabled' do
diff --git a/spec/requests/api/pages_domains_spec.rb b/spec/requests/api/pages_domains_spec.rb
index 35b6ed8d5c0ec1b74aed43c7cb25546d884fb21d..3eb68a6abb6b3994e9450cc191c96e4f9615edf0 100644
--- a/spec/requests/api/pages_domains_spec.rb
+++ b/spec/requests/api/pages_domains_spec.rb
@@ -236,7 +236,7 @@
 
     shared_examples_for 'post pages domains' do
       it 'creates a new pages domain' do
-        post api(route, user), params
+        post api(route, user), params: params
         pages_domain = PagesDomain.find_by(domain: json_response['domain'])
 
         expect(response).to have_gitlab_http_status(201)
@@ -247,7 +247,7 @@
       end
 
       it 'creates a new secure pages domain' do
-        post api(route, user), params_secure
+        post api(route, user), params: params_secure
         pages_domain = PagesDomain.find_by(domain: json_response['domain'])
 
         expect(response).to have_gitlab_http_status(201)
@@ -258,13 +258,13 @@
       end
 
       it 'fails to create pages domain without key' do
-        post api(route, user), pages_domain_secure_params.slice(:domain, :certificate)
+        post api(route, user), params: pages_domain_secure_params.slice(:domain, :certificate)
 
         expect(response).to have_gitlab_http_status(400)
       end
 
       it 'fails to create pages domain with key missmatch' do
-        post api(route, user), pages_domain_secure_key_missmatch_params.slice(:domain, :certificate, :key)
+        post api(route, user), params: pages_domain_secure_key_missmatch_params.slice(:domain, :certificate, :key)
 
         expect(response).to have_gitlab_http_status(400)
       end
@@ -284,7 +284,7 @@
       end
 
       it_behaves_like '403 response' do
-        let(:request) { post api(route, user), params }
+        let(:request) { post api(route, user), params: params }
       end
     end
 
@@ -294,7 +294,7 @@
       end
 
       it_behaves_like '403 response' do
-        let(:request) { post api(route, user), params }
+        let(:request) { post api(route, user), params: params }
       end
     end
 
@@ -304,13 +304,13 @@
       end
 
       it_behaves_like '403 response' do
-        let(:request) { post api(route, user), params }
+        let(:request) { post api(route, user), params: params }
       end
     end
 
     context 'when user is not a member' do
       it_behaves_like '404 response' do
-        let(:request) { post api(route, user), params }
+        let(:request) { post api(route, user), params: params }
       end
     end
   end
@@ -331,7 +331,7 @@
       end
 
       it 'updates pages domain adding certificate' do
-        put api(route_domain, user), params_secure
+        put api(route_domain, user), params: params_secure
         pages_domain.reload
 
         expect(response).to have_gitlab_http_status(200)
@@ -341,7 +341,7 @@
       end
 
       it 'updates pages domain with expired certificate' do
-        put api(route_expired_domain, user), params_secure
+        put api(route_expired_domain, user), params: params_secure
         pages_domain_expired.reload
 
         expect(response).to have_gitlab_http_status(200)
@@ -351,7 +351,7 @@
       end
 
       it 'updates pages domain with expired certificate not updating key' do
-        put api(route_secure_domain, user), params_secure_nokey
+        put api(route_secure_domain, user), params: params_secure_nokey
         pages_domain_secure.reload
 
         expect(response).to have_gitlab_http_status(200)
@@ -360,19 +360,19 @@
       end
 
       it 'fails to update pages domain adding certificate without key' do
-        put api(route_domain, user), params_secure_nokey
+        put api(route_domain, user), params: params_secure_nokey
 
         expect(response).to have_gitlab_http_status(400)
       end
 
       it 'fails to update pages domain adding certificate with missing chain' do
-        put api(route_domain, user), pages_domain_secure_missing_chain_params.slice(:certificate)
+        put api(route_domain, user), params: pages_domain_secure_missing_chain_params.slice(:certificate)
 
         expect(response).to have_gitlab_http_status(400)
       end
 
       it 'fails to update pages domain with key missmatch' do
-        put api(route_secure_domain, user), pages_domain_secure_key_missmatch_params.slice(:certificate, :key)
+        put api(route_secure_domain, user), params: pages_domain_secure_key_missmatch_params.slice(:certificate, :key)
 
         expect(response).to have_gitlab_http_status(400)
       end
diff --git a/spec/requests/api/pipeline_schedules_spec.rb b/spec/requests/api/pipeline_schedules_spec.rb
index 997d413eb4f23e034a3d3de9ccb09496e79c60d1..870ef34437f36b4a55956d11915036afbb40fa15 100644
--- a/spec/requests/api/pipeline_schedules_spec.rb
+++ b/spec/requests/api/pipeline_schedules_spec.rb
@@ -58,7 +58,7 @@ def create_pipeline_schedules(count)
           end
 
           it 'returns matched pipeline schedules' do
-            get api("/projects/#{project.id}/pipeline_schedules", developer), scope: target
+            get api("/projects/#{project.id}/pipeline_schedules", developer), params: { scope: target }
 
             expect(json_response.map { |r| r['active'] }).to all(eq(active?(target)))
           end
@@ -146,7 +146,7 @@ def active?(str)
         it 'creates pipeline_schedule' do
           expect do
             post api("/projects/#{project.id}/pipeline_schedules", developer),
-              params
+              params: params
           end.to change { project.pipeline_schedules.count }.by(1)
 
           expect(response).to have_gitlab_http_status(:created)
@@ -170,7 +170,7 @@ def active?(str)
       context 'when cron has validation error' do
         it 'does not create pipeline_schedule' do
           post api("/projects/#{project.id}/pipeline_schedules", developer),
-            params.merge('cron' => 'invalid-cron')
+            params: params.merge('cron' => 'invalid-cron')
 
           expect(response).to have_gitlab_http_status(:bad_request)
           expect(json_response['message']).to have_key('cron')
@@ -180,7 +180,7 @@ def active?(str)
 
     context 'authenticated user with invalid permissions' do
       it 'does not create pipeline_schedule' do
-        post api("/projects/#{project.id}/pipeline_schedules", user), params
+        post api("/projects/#{project.id}/pipeline_schedules", user), params: params
 
         expect(response).to have_gitlab_http_status(:not_found)
       end
@@ -188,7 +188,7 @@ def active?(str)
 
     context 'unauthenticated user' do
       it 'does not create pipeline_schedule' do
-        post api("/projects/#{project.id}/pipeline_schedules"), params
+        post api("/projects/#{project.id}/pipeline_schedules"), params: params
 
         expect(response).to have_gitlab_http_status(:unauthorized)
       end
@@ -203,7 +203,7 @@ def active?(str)
     context 'authenticated user with valid permissions' do
       it 'updates cron' do
         put api("/projects/#{project.id}/pipeline_schedules/#{pipeline_schedule.id}", developer),
-          cron: '1 2 3 4 *'
+          params: { cron: '1 2 3 4 *' }
 
         expect(response).to have_gitlab_http_status(:ok)
         expect(response).to match_response_schema('pipeline_schedule')
@@ -213,7 +213,7 @@ def active?(str)
       context 'when cron has validation error' do
         it 'does not update pipeline_schedule' do
           put api("/projects/#{project.id}/pipeline_schedules/#{pipeline_schedule.id}", developer),
-            cron: 'invalid-cron'
+            params: { cron: 'invalid-cron' }
 
           expect(response).to have_gitlab_http_status(:bad_request)
           expect(json_response['message']).to have_key('cron')
@@ -331,7 +331,7 @@ def active?(str)
         it 'creates pipeline_schedule_variable' do
           expect do
             post api("/projects/#{project.id}/pipeline_schedules/#{pipeline_schedule.id}/variables", developer),
-              params
+              params: params
           end.to change { pipeline_schedule.variables.count }.by(1)
 
           expect(response).to have_gitlab_http_status(:created)
@@ -352,7 +352,7 @@ def active?(str)
       context 'when key has validation error' do
         it 'does not create pipeline_schedule_variable' do
           post api("/projects/#{project.id}/pipeline_schedules/#{pipeline_schedule.id}/variables", developer),
-            params.merge('key' => '!?!?')
+            params: params.merge('key' => '!?!?')
 
           expect(response).to have_gitlab_http_status(:bad_request)
           expect(json_response['message']).to have_key('key')
@@ -362,7 +362,7 @@ def active?(str)
 
     context 'authenticated user with invalid permissions' do
       it 'does not create pipeline_schedule_variable' do
-        post api("/projects/#{project.id}/pipeline_schedules/#{pipeline_schedule.id}/variables", user), params
+        post api("/projects/#{project.id}/pipeline_schedules/#{pipeline_schedule.id}/variables", user), params: params
 
         expect(response).to have_gitlab_http_status(:not_found)
       end
@@ -370,7 +370,7 @@ def active?(str)
 
     context 'unauthenticated user' do
       it 'does not create pipeline_schedule_variable' do
-        post api("/projects/#{project.id}/pipeline_schedules/#{pipeline_schedule.id}/variables"), params
+        post api("/projects/#{project.id}/pipeline_schedules/#{pipeline_schedule.id}/variables"), params: params
 
         expect(response).to have_gitlab_http_status(:unauthorized)
       end
@@ -389,7 +389,7 @@ def active?(str)
     context 'authenticated user with valid permissions' do
       it 'updates pipeline_schedule_variable' do
         put api("/projects/#{project.id}/pipeline_schedules/#{pipeline_schedule.id}/variables/#{pipeline_schedule_variable.key}", developer),
-          value: 'updated_value'
+          params: { value: 'updated_value' }
 
         expect(response).to have_gitlab_http_status(:ok)
         expect(response).to match_response_schema('pipeline_schedule_variable')
diff --git a/spec/requests/api/pipelines_spec.rb b/spec/requests/api/pipelines_spec.rb
index 2fded38d1f28cd1f3f71a9592a6acf1e49ce8450..1f3f5bfdcb7d549fad155f6ffa68748a9daab59b 100644
--- a/spec/requests/api/pipelines_spec.rb
+++ b/spec/requests/api/pipelines_spec.rb
@@ -36,7 +36,7 @@
             end
 
             it 'returns matched pipelines' do
-              get api("/projects/#{project.id}/pipelines", user), scope: target
+              get api("/projects/#{project.id}/pipelines", user), params: { scope: target }
 
               expect(response).to have_gitlab_http_status(:ok)
               expect(response).to include_pagination_headers
@@ -54,7 +54,7 @@
           end
 
           it 'returns matched pipelines' do
-            get api("/projects/#{project.id}/pipelines", user), scope: 'finished'
+            get api("/projects/#{project.id}/pipelines", user), params: { scope: 'finished' }
 
             expect(response).to have_gitlab_http_status(:ok)
             expect(response).to include_pagination_headers
@@ -69,7 +69,7 @@
 
           context 'when scope is branches' do
             it 'returns matched pipelines' do
-              get api("/projects/#{project.id}/pipelines", user), scope: 'branches'
+              get api("/projects/#{project.id}/pipelines", user), params: { scope: 'branches' }
 
               expect(response).to have_gitlab_http_status(:ok)
               expect(response).to include_pagination_headers
@@ -80,7 +80,7 @@
 
           context 'when scope is tags' do
             it 'returns matched pipelines' do
-              get api("/projects/#{project.id}/pipelines", user), scope: 'tags'
+              get api("/projects/#{project.id}/pipelines", user), params: { scope: 'tags' }
 
               expect(response).to have_gitlab_http_status(:ok)
               expect(response).to include_pagination_headers
@@ -92,7 +92,7 @@
 
         context 'when scope is invalid' do
           it 'returns bad_request' do
-            get api("/projects/#{project.id}/pipelines", user), scope: 'invalid-scope'
+            get api("/projects/#{project.id}/pipelines", user), params: { scope: 'invalid-scope' }
 
             expect(response).to have_gitlab_http_status(:bad_request)
           end
@@ -107,7 +107,7 @@
             end
 
             it 'returns matched pipelines' do
-              get api("/projects/#{project.id}/pipelines", user), status: target
+              get api("/projects/#{project.id}/pipelines", user), params: { status: target }
 
               expect(response).to have_gitlab_http_status(:ok)
               expect(response).to include_pagination_headers
@@ -119,7 +119,7 @@
 
         context 'when status is invalid' do
           it 'returns bad_request' do
-            get api("/projects/#{project.id}/pipelines", user), status: 'invalid-status'
+            get api("/projects/#{project.id}/pipelines", user), params: { status: 'invalid-status' }
 
             expect(response).to have_gitlab_http_status(:bad_request)
           end
@@ -132,7 +132,7 @@
 
           context 'when ref exists' do
             it 'returns matched pipelines' do
-              get api("/projects/#{project.id}/pipelines", user), ref: 'master'
+              get api("/projects/#{project.id}/pipelines", user), params: { ref: 'master' }
 
               expect(response).to have_gitlab_http_status(:ok)
               expect(response).to include_pagination_headers
@@ -143,7 +143,7 @@
 
           context 'when ref does not exist' do
             it 'returns empty' do
-              get api("/projects/#{project.id}/pipelines", user), ref: 'invalid-ref'
+              get api("/projects/#{project.id}/pipelines", user), params: { ref: 'invalid-ref' }
 
               expect(response).to have_gitlab_http_status(:ok)
               expect(response).to include_pagination_headers
@@ -157,7 +157,7 @@
 
           context 'when name exists' do
             it 'returns matched pipelines' do
-              get api("/projects/#{project.id}/pipelines", user), name: user.name
+              get api("/projects/#{project.id}/pipelines", user), params: { name: user.name }
 
               expect(response).to have_gitlab_http_status(:ok)
               expect(response).to include_pagination_headers
@@ -167,7 +167,7 @@
 
           context 'when name does not exist' do
             it 'returns empty' do
-              get api("/projects/#{project.id}/pipelines", user), name: 'invalid-name'
+              get api("/projects/#{project.id}/pipelines", user), params: { name: 'invalid-name' }
 
               expect(response).to have_gitlab_http_status(:ok)
               expect(response).to include_pagination_headers
@@ -181,7 +181,7 @@
 
           context 'when username exists' do
             it 'returns matched pipelines' do
-              get api("/projects/#{project.id}/pipelines", user), username: user.username
+              get api("/projects/#{project.id}/pipelines", user), params: { username: user.username }
 
               expect(response).to have_gitlab_http_status(:ok)
               expect(response).to include_pagination_headers
@@ -191,7 +191,7 @@
 
           context 'when username does not exist' do
             it 'returns empty' do
-              get api("/projects/#{project.id}/pipelines", user), username: 'invalid-username'
+              get api("/projects/#{project.id}/pipelines", user), params: { username: 'invalid-username' }
 
               expect(response).to have_gitlab_http_status(:ok)
               expect(response).to include_pagination_headers
@@ -206,7 +206,7 @@
 
           context 'when yaml_errors is true' do
             it 'returns matched pipelines' do
-              get api("/projects/#{project.id}/pipelines", user), yaml_errors: true
+              get api("/projects/#{project.id}/pipelines", user), params: { yaml_errors: true }
 
               expect(response).to have_gitlab_http_status(:ok)
               expect(response).to include_pagination_headers
@@ -216,7 +216,7 @@
 
           context 'when yaml_errors is false' do
             it 'returns matched pipelines' do
-              get api("/projects/#{project.id}/pipelines", user), yaml_errors: false
+              get api("/projects/#{project.id}/pipelines", user), params: { yaml_errors: false }
 
               expect(response).to have_gitlab_http_status(:ok)
               expect(response).to include_pagination_headers
@@ -226,7 +226,7 @@
 
           context 'when yaml_errors is invalid' do
             it 'returns bad_request' do
-              get api("/projects/#{project.id}/pipelines", user), yaml_errors: 'invalid-yaml_errors'
+              get api("/projects/#{project.id}/pipelines", user), params: { yaml_errors: 'invalid-yaml_errors' }
 
               expect(response).to have_gitlab_http_status(:bad_request)
             end
@@ -243,7 +243,7 @@
 
             context 'when sort parameter is valid' do
               it 'sorts as user_id: :desc' do
-                get api("/projects/#{project.id}/pipelines", user), order_by: 'user_id', sort: 'desc'
+                get api("/projects/#{project.id}/pipelines", user), params: { order_by: 'user_id', sort: 'desc' }
 
                 expect(response).to have_gitlab_http_status(:ok)
                 expect(response).to include_pagination_headers
@@ -256,7 +256,7 @@
 
             context 'when sort parameter is invalid' do
               it 'returns bad_request' do
-                get api("/projects/#{project.id}/pipelines", user), order_by: 'user_id', sort: 'invalid_sort'
+                get api("/projects/#{project.id}/pipelines", user), params: { order_by: 'user_id', sort: 'invalid_sort' }
 
                 expect(response).to have_gitlab_http_status(:bad_request)
               end
@@ -265,7 +265,7 @@
 
           context 'when order_by is invalid' do
             it 'returns bad_request' do
-              get api("/projects/#{project.id}/pipelines", user), order_by: 'lock_version', sort: 'asc'
+              get api("/projects/#{project.id}/pipelines", user), params: { order_by: 'lock_version', sort: 'asc' }
 
               expect(response).to have_gitlab_http_status(:bad_request)
             end
@@ -303,7 +303,7 @@ def expect_variables(variables, expected_variables)
 
         it 'creates and returns a new pipeline' do
           expect do
-            post api("/projects/#{project.id}/pipeline", user), ref: project.default_branch
+            post api("/projects/#{project.id}/pipeline", user), params: { ref: project.default_branch }
           end.to change { project.ci_pipelines.count }.by(1)
 
           expect(response).to have_gitlab_http_status(201)
@@ -316,7 +316,7 @@ def expect_variables(variables, expected_variables)
 
           it 'creates and returns a new pipeline using the given variables' do
             expect do
-              post api("/projects/#{project.id}/pipeline", user), ref: project.default_branch, variables: variables
+              post api("/projects/#{project.id}/pipeline", user), params: { ref: project.default_branch, variables: variables }
             end.to change { project.ci_pipelines.count }.by(1)
             expect_variables(project.ci_pipelines.last.variables, variables)
 
@@ -337,7 +337,7 @@ def expect_variables(variables, expected_variables)
 
           it 'creates and returns a new pipeline using the given variables' do
             expect do
-              post api("/projects/#{project.id}/pipeline", user), ref: project.default_branch, variables: variables
+              post api("/projects/#{project.id}/pipeline", user), params: { ref: project.default_branch, variables: variables }
             end.to change { project.ci_pipelines.count }.by(1)
             expect_variables(project.ci_pipelines.last.variables, variables)
 
@@ -352,7 +352,7 @@ def expect_variables(variables, expected_variables)
 
             it "doesn't create a job" do
               expect do
-                post api("/projects/#{project.id}/pipeline", user), ref: project.default_branch
+                post api("/projects/#{project.id}/pipeline", user), params: { ref: project.default_branch }
               end.not_to change { project.ci_pipelines.count }
 
               expect(response).to have_gitlab_http_status(400)
@@ -361,7 +361,7 @@ def expect_variables(variables, expected_variables)
         end
 
         it 'fails when using an invalid ref' do
-          post api("/projects/#{project.id}/pipeline", user), ref: 'invalid_ref'
+          post api("/projects/#{project.id}/pipeline", user), params: { ref: 'invalid_ref' }
 
           expect(response).to have_gitlab_http_status(400)
           expect(json_response['message']['base'].first).to eq 'Reference not found'
@@ -376,7 +376,7 @@ def expect_variables(variables, expected_variables)
           end
 
           it 'fails to create pipeline' do
-            post api("/projects/#{project.id}/pipeline", user), ref: project.default_branch
+            post api("/projects/#{project.id}/pipeline", user), params: { ref: project.default_branch }
 
             expect(response).to have_gitlab_http_status(400)
             expect(json_response['message']['base'].first).to eq 'Missing .gitlab-ci.yml file'
@@ -388,7 +388,7 @@ def expect_variables(variables, expected_variables)
 
     context 'unauthorized user' do
       it 'does not create pipeline' do
-        post api("/projects/#{project.id}/pipeline", non_member), ref: project.default_branch
+        post api("/projects/#{project.id}/pipeline", non_member), params: { ref: project.default_branch }
 
         expect(response).to have_gitlab_http_status(404)
         expect(json_response['message']).to eq '404 Project Not Found'
diff --git a/spec/requests/api/project_export_spec.rb b/spec/requests/api/project_export_spec.rb
index 0586025956fa53fcd9a6c2ea8aefd73b183c6531..1d2f81a397d21169796dd6f0fb7ad56aebdfadb6 100644
--- a/spec/requests/api/project_export_spec.rb
+++ b/spec/requests/api/project_export_spec.rb
@@ -294,14 +294,14 @@
       context 'with upload strategy' do
         context 'when params invalid' do
           it_behaves_like '400 response' do
-            let(:request) { post(api(path, user), 'upload[url]' => 'whatever') }
+            let(:request) { post(api(path, user), params: { 'upload[url]' => 'whatever' }) }
           end
         end
 
         it 'starts' do
           allow_any_instance_of(Gitlab::ImportExport::AfterExportStrategies::WebUploadStrategy).to receive(:send_file)
 
-          post(api(path, user), 'upload[url]' => 'http://gitlab.com')
+          post(api(path, user), params: { 'upload[url]' => 'http://gitlab.com' })
 
           expect(response).to have_gitlab_http_status(202)
         end
@@ -374,7 +374,7 @@
           params = { description: "Foo" }
 
           expect_any_instance_of(Projects::ImportExport::ExportService).to receive(:execute)
-          post api(path, project.owner), params
+          post api(path, project.owner), params: params
 
           expect(response).to have_gitlab_http_status(202)
         end
diff --git a/spec/requests/api/project_hooks_spec.rb b/spec/requests/api/project_hooks_spec.rb
index 87997a48dc9d533200b0fc2282c54f8ac9309b83..b88a8b95201bca892b089dc44adb0efaf14aeb8f 100644
--- a/spec/requests/api/project_hooks_spec.rb
+++ b/spec/requests/api/project_hooks_spec.rb
@@ -91,8 +91,7 @@
     it "adds hook to project" do
       expect do
         post api("/projects/#{project.id}/hooks", user),
-          url: "http://example.com", issues_events: true, confidential_issues_events: true, wiki_page_events: true,
-          job_events: true, push_events_branch_filter: 'some-feature-branch'
+          params: { url: "http://example.com", issues_events: true, confidential_issues_events: true, wiki_page_events: true, job_events: true, push_events_branch_filter: 'some-feature-branch' }
       end.to change {project.hooks.count}.by(1)
 
       expect(response).to have_gitlab_http_status(201)
@@ -116,7 +115,7 @@
       token = "secret token"
 
       expect do
-        post api("/projects/#{project.id}/hooks", user), url: "http://example.com", token: token
+        post api("/projects/#{project.id}/hooks", user), params: { url: "http://example.com", token: token }
       end.to change {project.hooks.count}.by(1)
 
       expect(response).to have_gitlab_http_status(201)
@@ -135,12 +134,12 @@
     end
 
     it "returns a 422 error if url not valid" do
-      post api("/projects/#{project.id}/hooks", user), url: "ftp://example.com"
+      post api("/projects/#{project.id}/hooks", user), params: { url: "ftp://example.com" }
       expect(response).to have_gitlab_http_status(422)
     end
 
     it "returns a 422 error if branch filter is not valid" do
-      post api("/projects/#{project.id}/hooks", user), url: "http://example.com", push_events_branch_filter: '~badbranchname/'
+      post api("/projects/#{project.id}/hooks", user), params: { url: "http://example.com", push_events_branch_filter: '~badbranchname/' }
       expect(response).to have_gitlab_http_status(422)
     end
   end
@@ -148,7 +147,7 @@
   describe "PUT /projects/:id/hooks/:hook_id" do
     it "updates an existing project hook" do
       put api("/projects/#{project.id}/hooks/#{hook.id}", user),
-        url: 'http://example.org', push_events: false, job_events: true
+        params: { url: 'http://example.org', push_events: false, job_events: true }
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['url']).to eq('http://example.org')
@@ -168,7 +167,7 @@
     it "adds the token without including it in the response" do
       token = "secret token"
 
-      put api("/projects/#{project.id}/hooks/#{hook.id}", user), url: "http://example.org", token: token
+      put api("/projects/#{project.id}/hooks/#{hook.id}", user), params: { url: "http://example.org", token: token }
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response["url"]).to eq("http://example.org")
@@ -179,7 +178,7 @@
     end
 
     it "returns 404 error if hook id not found" do
-      put api("/projects/#{project.id}/hooks/1234", user), url: 'http://example.org'
+      put api("/projects/#{project.id}/hooks/1234", user), params: { url: 'http://example.org' }
       expect(response).to have_gitlab_http_status(404)
     end
 
@@ -189,7 +188,7 @@
     end
 
     it "returns a 422 error if url is not valid" do
-      put api("/projects/#{project.id}/hooks/#{hook.id}", user), url: 'ftp://example.com'
+      put api("/projects/#{project.id}/hooks/#{hook.id}", user), params: { url: 'ftp://example.com' }
       expect(response).to have_gitlab_http_status(422)
     end
   end
diff --git a/spec/requests/api/project_import_spec.rb b/spec/requests/api/project_import_spec.rb
index 204702b8a5a279345ba0832554c4c4011a3a188f..594b42bb6c0170491a729eb46284ed9ef7b6fecd 100644
--- a/spec/requests/api/project_import_spec.rb
+++ b/spec/requests/api/project_import_spec.rb
@@ -20,7 +20,7 @@
     it 'schedules an import using a namespace' do
       stub_import(namespace)
 
-      post api('/projects/import', user), path: 'test-import', file: fixture_file_upload(file), namespace: namespace.id
+      post api('/projects/import', user), params: { path: 'test-import', file: fixture_file_upload(file), namespace: namespace.id }
 
       expect(response).to have_gitlab_http_status(201)
     end
@@ -28,7 +28,7 @@
     it 'schedules an import using the namespace path' do
       stub_import(namespace)
 
-      post api('/projects/import', user), path: 'test-import', file: fixture_file_upload(file), namespace: namespace.full_path
+      post api('/projects/import', user), params: { path: 'test-import', file: fixture_file_upload(file), namespace: namespace.full_path }
 
       expect(response).to have_gitlab_http_status(201)
     end
@@ -36,7 +36,7 @@
     it 'schedules an import at the user namespace level' do
       stub_import(user.namespace)
 
-      post api('/projects/import', user), path: 'test-import2', file: fixture_file_upload(file)
+      post api('/projects/import', user), params: { path: 'test-import2', file: fixture_file_upload(file) }
 
       expect(response).to have_gitlab_http_status(201)
     end
@@ -45,7 +45,7 @@
       expect_any_instance_of(ProjectImportState).not_to receive(:schedule)
       expect(::Projects::CreateService).not_to receive(:new)
 
-      post api('/projects/import', user), namespace: 'nonexistent', path: 'test-import2', file: fixture_file_upload(file)
+      post api('/projects/import', user), params: { namespace: 'nonexistent', path: 'test-import2', file: fixture_file_upload(file) }
 
       expect(response).to have_gitlab_http_status(404)
       expect(json_response['message']).to eq('404 Namespace Not Found')
@@ -55,9 +55,11 @@
       expect_any_instance_of(ProjectImportState).not_to receive(:schedule)
 
       post(api('/projects/import', create(:user)),
-           path: 'test-import3',
-           file: fixture_file_upload(file),
-           namespace: namespace.full_path)
+           params: {
+             path: 'test-import3',
+             file: fixture_file_upload(file),
+             namespace: namespace.full_path
+           })
 
       expect(response).to have_gitlab_http_status(404)
       expect(json_response['message']).to eq('404 Namespace Not Found')
@@ -66,7 +68,7 @@
     it 'does not schedule an import if the user uploads no valid file' do
       expect_any_instance_of(ProjectImportState).not_to receive(:schedule)
 
-      post api('/projects/import', user), path: 'test-import3', file: './random/test'
+      post api('/projects/import', user), params: { path: 'test-import3', file: './random/test' }
 
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['error']).to eq('file is invalid')
@@ -77,10 +79,12 @@
       override_params = { 'description' => 'Hello world' }
 
       post api('/projects/import', user),
-           path: 'test-import',
-           file: fixture_file_upload(file),
-           namespace: namespace.id,
-           override_params: override_params
+           params: {
+             path: 'test-import',
+             file: fixture_file_upload(file),
+             namespace: namespace.id,
+             override_params: override_params
+           }
       import_project = Project.find(json_response['id'])
 
       expect(import_project.import_data.data['override_params']).to eq(override_params)
@@ -91,10 +95,12 @@
       override_params = { 'not_allowed' => 'Hello world' }
 
       post api('/projects/import', user),
-           path: 'test-import',
-           file: fixture_file_upload(file),
-           namespace: namespace.id,
-           override_params: override_params
+           params: {
+             path: 'test-import',
+             file: fixture_file_upload(file),
+             namespace: namespace.id,
+             override_params: override_params
+           }
       import_project = Project.find(json_response['id'])
 
       expect(import_project.import_data.data['override_params']).to be_empty
@@ -105,10 +111,12 @@
 
       perform_enqueued_jobs do
         post api('/projects/import', user),
-             path: 'test-import',
-             file: fixture_file_upload(file),
-             namespace: namespace.id,
-             override_params: override_params
+             params: {
+               path: 'test-import',
+               file: fixture_file_upload(file),
+               namespace: namespace.id,
+               override_params: override_params
+             }
       end
       import_project = Project.find(json_response['id'])
 
@@ -121,7 +129,7 @@
       it 'does not schedule an import' do
         expect_any_instance_of(ProjectImportState).not_to receive(:schedule)
 
-        post api('/projects/import', user), path: existing_project.path, file: fixture_file_upload(file)
+        post api('/projects/import', user), params: { path: existing_project.path, file: fixture_file_upload(file) }
 
         expect(response).to have_gitlab_http_status(400)
         expect(json_response['message']).to eq('Name has already been taken')
@@ -131,7 +139,7 @@
         it 'schedules an import' do
           stub_import(user.namespace)
 
-          post api('/projects/import', user), path: existing_project.path, file: fixture_file_upload(file), overwrite: true
+          post api('/projects/import', user), params: { path: existing_project.path, file: fixture_file_upload(file), overwrite: true }
 
           expect(response).to have_gitlab_http_status(201)
         end
diff --git a/spec/requests/api/project_milestones_spec.rb b/spec/requests/api/project_milestones_spec.rb
index 62613aa5938bbe86ced6556148348660c0f26437..0fa13dd71e2f0acd90c19f408053b46cbaf89540 100644
--- a/spec/requests/api/project_milestones_spec.rb
+++ b/spec/requests/api/project_milestones_spec.rb
@@ -46,7 +46,7 @@
       expect(Event).to receive(:create!)
 
       put api("/projects/#{project.id}/milestones/#{milestone.id}", user),
-          state_event: 'close'
+          params: { state_event: 'close' }
     end
   end
 end
diff --git a/spec/requests/api/project_snapshots_spec.rb b/spec/requests/api/project_snapshots_spec.rb
index 07a920f8d287075fa79d0d44cae12267fefe4c2b..44b5ee1f130893c4e6412010c82b88e263152e02 100644
--- a/spec/requests/api/project_snapshots_spec.rb
+++ b/spec/requests/api/project_snapshots_spec.rb
@@ -35,14 +35,14 @@ def expect_snapshot_response_for(repository)
     end
 
     it 'requests project repository raw archive as administrator' do
-      get api("/projects/#{project.id}/snapshot", admin), wiki: '0'
+      get api("/projects/#{project.id}/snapshot", admin), params: { wiki: '0' }
 
       expect(response).to have_gitlab_http_status(200)
       expect_snapshot_response_for(project.repository)
     end
 
     it 'requests wiki repository raw archive as administrator' do
-      get api("/projects/#{project.id}/snapshot", admin), wiki: '1'
+      get api("/projects/#{project.id}/snapshot", admin), params: { wiki: '1' }
 
       expect(response).to have_gitlab_http_status(200)
       expect_snapshot_response_for(project.wiki.repository)
diff --git a/spec/requests/api/project_snippets_spec.rb b/spec/requests/api/project_snippets_spec.rb
index 5dec0bc778c568dcce35d361a3ccbf43a0f15598..29f69b6ce20ecff5020e76c9561403054b12b65d 100644
--- a/spec/requests/api/project_snippets_spec.rb
+++ b/spec/requests/api/project_snippets_spec.rb
@@ -97,7 +97,7 @@
     end
 
     it 'creates a new snippet' do
-      post api("/projects/#{project.id}/snippets/", admin), params
+      post api("/projects/#{project.id}/snippets/", admin), params: params
 
       expect(response).to have_gitlab_http_status(201)
       snippet = ProjectSnippet.find(json_response['id'])
@@ -111,7 +111,7 @@
     it 'returns 400 for missing parameters' do
       params.delete(:title)
 
-      post api("/projects/#{project.id}/snippets/", admin), params
+      post api("/projects/#{project.id}/snippets/", admin), params: params
 
       expect(response).to have_gitlab_http_status(400)
     end
@@ -119,7 +119,7 @@
     it 'returns 400 for empty code field' do
       params[:code] = ''
 
-      post api("/projects/#{project.id}/snippets/", admin), params
+      post api("/projects/#{project.id}/snippets/", admin), params: params
 
       expect(response).to have_gitlab_http_status(400)
     end
@@ -128,7 +128,7 @@
       def create_snippet(project, snippet_params = {})
         project.add_developer(user)
 
-        post api("/projects/#{project.id}/snippets", user), params.merge(snippet_params)
+        post api("/projects/#{project.id}/snippets", user), params: params.merge(snippet_params)
       end
 
       before do
@@ -167,7 +167,7 @@ def create_snippet(project, snippet_params = {})
       new_content = 'New content'
       new_description = 'New description'
 
-      put api("/projects/#{snippet.project.id}/snippets/#{snippet.id}/", admin), code: new_content, description: new_description
+      put api("/projects/#{snippet.project.id}/snippets/#{snippet.id}/", admin), params: { code: new_content, description: new_description }
 
       expect(response).to have_gitlab_http_status(200)
       snippet.reload
@@ -176,7 +176,7 @@ def create_snippet(project, snippet_params = {})
     end
 
     it 'returns 404 for invalid snippet id' do
-      put api("/projects/#{snippet.project.id}/snippets/1234", admin), title: 'foo'
+      put api("/projects/#{snippet.project.id}/snippets/1234", admin), params: { title: 'foo' }
 
       expect(response).to have_gitlab_http_status(404)
       expect(json_response['message']).to eq('404 Snippet Not Found')
@@ -191,14 +191,14 @@ def create_snippet(project, snippet_params = {})
     it 'returns 400 for empty code field' do
       new_content = ''
 
-      put api("/projects/#{snippet.project.id}/snippets/#{snippet.id}/", admin), code: new_content
+      put api("/projects/#{snippet.project.id}/snippets/#{snippet.id}/", admin), params: { code: new_content }
 
       expect(response).to have_gitlab_http_status(400)
     end
 
     context 'when the snippet is spam' do
       def update_snippet(snippet_params = {})
-        put api("/projects/#{snippet.project.id}/snippets/#{snippet.id}", admin), snippet_params
+        put api("/projects/#{snippet.project.id}/snippets/#{snippet.id}", admin), params: snippet_params
       end
 
       before do
diff --git a/spec/requests/api/project_templates_spec.rb b/spec/requests/api/project_templates_spec.rb
index 86e33f2395188f37c9eb81051ce58ea0eceb8c5b..ab5d4de7ff7aed2d9811ed7ddc52c97b0913130c 100644
--- a/spec/requests/api/project_templates_spec.rb
+++ b/spec/requests/api/project_templates_spec.rb
@@ -130,8 +130,10 @@
   describe 'GET /projects/:id/templates/licenses/:key' do
     it 'fills placeholders in the license' do
       get api("/projects/#{public_project.id}/templates/licenses/agpl-3.0"),
-          project: 'Project Placeholder',
-          fullname: 'Fullname Placeholder'
+          params: {
+            project: 'Project Placeholder',
+            fullname: 'Fullname Placeholder'
+          }
 
       expect(response).to have_gitlab_http_status(200)
       expect(response).to match_response_schema('public_api/v4/license')
diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb
index 8bec77895d92e667d12c70cf86bd72c4ebc0c210..a2cb66f68b21b6f838e90eef3023c2473375df4d 100644
--- a/spec/requests/api/projects_spec.rb
+++ b/spec/requests/api/projects_spec.rb
@@ -52,7 +52,7 @@
   describe 'GET /projects' do
     shared_examples_for 'projects response' do
       it 'returns an array of projects' do
-        get api('/projects', current_user), filter
+        get api('/projects', current_user), params: filter
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to include_pagination_headers
@@ -61,7 +61,7 @@
       end
 
       it 'returns the proper security headers' do
-        get api('/projects', current_user), filter
+        get api('/projects', current_user), params: filter
 
         expect(response).to include_security_headers
       end
@@ -192,7 +192,7 @@
       end
 
       it "includes statistics if requested" do
-        get api('/projects', user), statistics: true
+        get api('/projects', user), params: { statistics: true }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to include_pagination_headers
@@ -210,7 +210,7 @@
       end
 
       it "does not include license if requested" do
-        get api('/projects', user), license: true
+        get api('/projects', user), params: { license: true }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to include_pagination_headers
@@ -315,7 +315,7 @@
 
       context 'and using the visibility filter' do
         it 'filters based on private visibility param' do
-          get api('/projects', user), { visibility: 'private' }
+          get api('/projects', user), params: { visibility: 'private' }
 
           expect(response).to have_gitlab_http_status(200)
           expect(response).to include_pagination_headers
@@ -326,7 +326,7 @@
         it 'filters based on internal visibility param' do
           project2.update_attribute(:visibility_level, Gitlab::VisibilityLevel::INTERNAL)
 
-          get api('/projects', user), { visibility: 'internal' }
+          get api('/projects', user), params: { visibility: 'internal' }
 
           expect(response).to have_gitlab_http_status(200)
           expect(response).to include_pagination_headers
@@ -335,7 +335,7 @@
         end
 
         it 'filters based on public visibility param' do
-          get api('/projects', user), { visibility: 'public' }
+          get api('/projects', user), params: { visibility: 'public' }
 
           expect(response).to have_gitlab_http_status(200)
           expect(response).to include_pagination_headers
@@ -346,7 +346,7 @@
 
       context 'and using sorting' do
         it 'returns the correct order when sorted by id' do
-          get api('/projects', user), { order_by: 'id', sort: 'desc' }
+          get api('/projects', user), params: { order_by: 'id', sort: 'desc' }
 
           expect(response).to have_gitlab_http_status(200)
           expect(response).to include_pagination_headers
@@ -357,7 +357,7 @@
 
       context 'and with owned=true' do
         it 'returns an array of projects the user owns' do
-          get api('/projects', user4), owned: true
+          get api('/projects', user4), params: { owned: true }
 
           expect(response).to have_gitlab_http_status(200)
           expect(response).to include_pagination_headers
@@ -376,7 +376,7 @@
         end
 
         it 'returns the starred projects viewable by the user' do
-          get api('/projects', user3), starred: true
+          get api('/projects', user3), params: { starred: true }
 
           expect(response).to have_gitlab_http_status(200)
           expect(response).to include_pagination_headers
@@ -398,7 +398,7 @@
 
         context 'including owned filter' do
           it 'returns only projects that satisfy all query parameters' do
-            get api('/projects', user), { visibility: 'public', owned: true, starred: true, search: 'gitlab' }
+            get api('/projects', user), params: { visibility: 'public', owned: true, starred: true, search: 'gitlab' }
 
             expect(response).to have_gitlab_http_status(200)
             expect(response).to include_pagination_headers
@@ -417,7 +417,7 @@
           end
 
           it 'returns only projects that satisfy all query parameters' do
-            get api('/projects', user), { visibility: 'public', membership: true, starred: true, search: 'gitlab' }
+            get api('/projects', user), params: { visibility: 'public', membership: true, starred: true, search: 'gitlab' }
 
             expect(response).to have_gitlab_http_status(200)
             expect(response).to include_pagination_headers
@@ -436,7 +436,7 @@
         end
 
         it 'returns an array of groups the user has at least developer access' do
-          get api('/projects', user2), { min_access_level: 30 }
+          get api('/projects', user2), params: { min_access_level: 30 }
           expect(response).to have_gitlab_http_status(200)
           expect(response).to include_pagination_headers
           expect(json_response).to be_an Array
@@ -479,14 +479,14 @@
     context 'maximum number of projects reached' do
       it 'does not create new project and respond with 403' do
         allow_any_instance_of(User).to receive(:projects_limit_left).and_return(0)
-        expect { post api('/projects', user2), name: 'foo' }
+        expect { post api('/projects', user2), params: { name: 'foo' } }
           .to change {Project.count}.by(0)
         expect(response).to have_gitlab_http_status(403)
       end
     end
 
     it 'creates new project without path but with name and returns 201' do
-      expect { post api('/projects', user), name: 'Foo Project' }
+      expect { post api('/projects', user), params: { name: 'Foo Project' } }
         .to change { Project.count }.by(1)
       expect(response).to have_gitlab_http_status(201)
 
@@ -497,7 +497,7 @@
     end
 
     it 'creates new project without name but with path and returns 201' do
-      expect { post api('/projects', user), path: 'foo_project' }
+      expect { post api('/projects', user), params: { path: 'foo_project' } }
         .to change { Project.count }.by(1)
       expect(response).to have_gitlab_http_status(201)
 
@@ -508,7 +508,7 @@
     end
 
     it 'creates new project with name and path and returns 201' do
-      expect { post api('/projects', user), path: 'path-project-Foo', name: 'Foo Project' }
+      expect { post api('/projects', user), params: { path: 'path-project-Foo', name: 'Foo Project' } }
         .to change { Project.count }.by(1)
       expect(response).to have_gitlab_http_status(201)
 
@@ -520,7 +520,7 @@
 
     it 'creates last project before reaching project limit' do
       allow_any_instance_of(User).to receive(:projects_limit_left).and_return(1)
-      post api('/projects', user2), name: 'foo'
+      post api('/projects', user2), params: { name: 'foo' }
       expect(response).to have_gitlab_http_status(201)
     end
 
@@ -544,7 +544,7 @@
         merge_method: 'ff'
       })
 
-      post api('/projects', user), project
+      post api('/projects', user), params: project
 
       expect(response).to have_gitlab_http_status(201)
 
@@ -564,7 +564,7 @@
     it 'sets a project as public' do
       project = attributes_for(:project, visibility: 'public')
 
-      post api('/projects', user), project
+      post api('/projects', user), params: project
 
       expect(json_response['visibility']).to eq('public')
     end
@@ -572,7 +572,7 @@
     it 'sets a project as internal' do
       project = attributes_for(:project, visibility: 'internal')
 
-      post api('/projects', user), project
+      post api('/projects', user), params: project
 
       expect(json_response['visibility']).to eq('internal')
     end
@@ -580,7 +580,7 @@
     it 'sets a project as private' do
       project = attributes_for(:project, visibility: 'private')
 
-      post api('/projects', user), project
+      post api('/projects', user), params: project
 
       expect(json_response['visibility']).to eq('private')
     end
@@ -588,7 +588,7 @@
     it 'creates a new project initialized with a README.md' do
       project = attributes_for(:project, initialize_with_readme: 1, name: 'somewhere')
 
-      post api('/projects', user), project
+      post api('/projects', user), params: project
 
       expect(json_response['readme_url']).to eql("#{Gitlab.config.gitlab.url}/#{json_response['namespace']['full_path']}/somewhere/blob/master/README.md")
     end
@@ -596,7 +596,7 @@
     it 'sets tag list to a project' do
       project = attributes_for(:project, tag_list: %w[tagFirst tagSecond])
 
-      post api('/projects', user), project
+      post api('/projects', user), params: project
 
       expect(json_response['tag_list']).to eq(%w[tagFirst tagSecond])
     end
@@ -604,7 +604,7 @@
     it 'uploads avatar for project a project' do
       project = attributes_for(:project, avatar: fixture_file_upload('spec/fixtures/banana_sample.gif', 'image/gif'))
 
-      post api('/projects', user), project
+      post api('/projects', user), params: project
 
       project_id = json_response['id']
       expect(json_response['avatar_url']).to eq("http://localhost/uploads/-/system/project/avatar/#{project_id}/banana_sample.gif")
@@ -613,7 +613,7 @@
     it 'sets a project as not allowing outdated diff discussions to automatically resolve' do
       project = attributes_for(:project, resolve_outdated_diff_discussions: false)
 
-      post api('/projects', user), project
+      post api('/projects', user), params: project
 
       expect(json_response['resolve_outdated_diff_discussions']).to be_falsey
     end
@@ -621,7 +621,7 @@
     it 'sets a project as allowing outdated diff discussions to automatically resolve' do
       project = attributes_for(:project, resolve_outdated_diff_discussions: true)
 
-      post api('/projects', user), project
+      post api('/projects', user), params: project
 
       expect(json_response['resolve_outdated_diff_discussions']).to be_truthy
     end
@@ -629,7 +629,7 @@
     it 'sets a project as allowing merge even if build fails' do
       project = attributes_for(:project, only_allow_merge_if_pipeline_succeeds: false)
 
-      post api('/projects', user), project
+      post api('/projects', user), params: project
 
       expect(json_response['only_allow_merge_if_pipeline_succeeds']).to be_falsey
     end
@@ -637,7 +637,7 @@
     it 'sets a project as allowing merge only if merge_when_pipeline_succeeds' do
       project = attributes_for(:project, only_allow_merge_if_pipeline_succeeds: true)
 
-      post api('/projects', user), project
+      post api('/projects', user), params: project
 
       expect(json_response['only_allow_merge_if_pipeline_succeeds']).to be_truthy
     end
@@ -645,7 +645,7 @@
     it 'sets a project as allowing merge even if discussions are unresolved' do
       project = attributes_for(:project, only_allow_merge_if_all_discussions_are_resolved: false)
 
-      post api('/projects', user), project
+      post api('/projects', user), params: project
 
       expect(json_response['only_allow_merge_if_all_discussions_are_resolved']).to be_falsey
     end
@@ -653,7 +653,7 @@
     it 'sets a project as allowing merge if only_allow_merge_if_all_discussions_are_resolved is nil' do
       project = attributes_for(:project, only_allow_merge_if_all_discussions_are_resolved: nil)
 
-      post api('/projects', user), project
+      post api('/projects', user), params: project
 
       expect(json_response['only_allow_merge_if_all_discussions_are_resolved']).to be_falsey
     end
@@ -661,7 +661,7 @@
     it 'sets a project as allowing merge only if all discussions are resolved' do
       project = attributes_for(:project, only_allow_merge_if_all_discussions_are_resolved: true)
 
-      post api('/projects', user), project
+      post api('/projects', user), params: project
 
       expect(json_response['only_allow_merge_if_all_discussions_are_resolved']).to be_truthy
     end
@@ -669,7 +669,7 @@
     it 'sets the merge method of a project to rebase merge' do
       project = attributes_for(:project, merge_method: 'rebase_merge')
 
-      post api('/projects', user), project
+      post api('/projects', user), params: project
 
       expect(json_response['merge_method']).to eq('rebase_merge')
     end
@@ -677,7 +677,7 @@
     it 'rejects invalid values for merge_method' do
       project = attributes_for(:project, merge_method: 'totally_not_valid_method')
 
-      post api('/projects', user), project
+      post api('/projects', user), params: project
 
       expect(response).to have_gitlab_http_status(400)
     end
@@ -685,7 +685,7 @@
     it 'ignores import_url when it is nil' do
       project = attributes_for(:project, import_url: nil)
 
-      post api('/projects', user), project
+      post api('/projects', user), params: project
 
       expect(response).to have_gitlab_http_status(201)
     end
@@ -698,7 +698,7 @@
       end
 
       it 'does not allow a non-admin to use a restricted visibility level' do
-        post api('/projects', user), project_param
+        post api('/projects', user), params: project_param
 
         expect(response).to have_gitlab_http_status(400)
         expect(json_response['message']['visibility_level'].first).to(
@@ -707,7 +707,7 @@
       end
 
       it 'allows an admin to override restricted visibility settings' do
-        post api('/projects', admin), project_param
+        post api('/projects', admin), params: project_param
 
         expect(json_response['visibility']).to eq('public')
       end
@@ -739,7 +739,7 @@
       private_project1.add_developer(user2)
       private_project2.add_reporter(user2)
 
-      get api("/users/#{user4.id}/projects/", user2), { min_access_level: 30 }
+      get api("/users/#{user4.id}/projects/", user2), params: { min_access_level: 30 }
 
       expect(response).to have_gitlab_http_status(200)
       expect(response).to include_pagination_headers
@@ -750,7 +750,7 @@
 
   describe 'POST /projects/user/:id' do
     it 'creates new project without path but with name and return 201' do
-      expect { post api("/projects/user/#{user.id}", admin), name: 'Foo Project' }.to change { Project.count }.by(1)
+      expect { post api("/projects/user/#{user.id}", admin), params: { name: 'Foo Project' } }.to change { Project.count }.by(1)
       expect(response).to have_gitlab_http_status(201)
 
       project = Project.last
@@ -760,7 +760,7 @@
     end
 
     it 'creates new project with name and path and returns 201' do
-      expect { post api("/projects/user/#{user.id}", admin), path: 'path-project-Foo', name: 'Foo Project' }
+      expect { post api("/projects/user/#{user.id}", admin), params: { path: 'path-project-Foo', name: 'Foo Project' } }
         .to change { Project.count }.by(1)
       expect(response).to have_gitlab_http_status(201)
 
@@ -787,7 +787,7 @@
         jobs_enabled: true
       })
 
-      post api("/projects/user/#{user.id}", admin), project
+      post api("/projects/user/#{user.id}", admin), params: project
 
       expect(response).to have_gitlab_http_status(201)
 
@@ -801,7 +801,7 @@
     it 'sets a project as public' do
       project = attributes_for(:project, visibility: 'public')
 
-      post api("/projects/user/#{user.id}", admin), project
+      post api("/projects/user/#{user.id}", admin), params: project
 
       expect(response).to have_gitlab_http_status(201)
       expect(json_response['visibility']).to eq('public')
@@ -810,7 +810,7 @@
     it 'sets a project as internal' do
       project = attributes_for(:project, visibility: 'internal')
 
-      post api("/projects/user/#{user.id}", admin), project
+      post api("/projects/user/#{user.id}", admin), params: project
 
       expect(response).to have_gitlab_http_status(201)
       expect(json_response['visibility']).to eq('internal')
@@ -819,7 +819,7 @@
     it 'sets a project as private' do
       project = attributes_for(:project, visibility: 'private')
 
-      post api("/projects/user/#{user.id}", admin), project
+      post api("/projects/user/#{user.id}", admin), params: project
 
       expect(json_response['visibility']).to eq('private')
     end
@@ -827,7 +827,7 @@
     it 'sets a project as not allowing outdated diff discussions to automatically resolve' do
       project = attributes_for(:project, resolve_outdated_diff_discussions: false)
 
-      post api("/projects/user/#{user.id}", admin), project
+      post api("/projects/user/#{user.id}", admin), params: project
 
       expect(json_response['resolve_outdated_diff_discussions']).to be_falsey
     end
@@ -835,27 +835,27 @@
     it 'sets a project as allowing outdated diff discussions to automatically resolve' do
       project = attributes_for(:project, resolve_outdated_diff_discussions: true)
 
-      post api("/projects/user/#{user.id}", admin), project
+      post api("/projects/user/#{user.id}", admin), params: project
 
       expect(json_response['resolve_outdated_diff_discussions']).to be_truthy
     end
 
     it 'sets a project as allowing merge even if build fails' do
       project = attributes_for(:project, only_allow_merge_if_pipeline_succeeds: false)
-      post api("/projects/user/#{user.id}", admin), project
+      post api("/projects/user/#{user.id}", admin), params: project
       expect(json_response['only_allow_merge_if_pipeline_succeeds']).to be_falsey
     end
 
     it 'sets a project as allowing merge only if pipeline succeeds' do
       project = attributes_for(:project, only_allow_merge_if_pipeline_succeeds: true)
-      post api("/projects/user/#{user.id}", admin), project
+      post api("/projects/user/#{user.id}", admin), params: project
       expect(json_response['only_allow_merge_if_pipeline_succeeds']).to be_truthy
     end
 
     it 'sets a project as allowing merge even if discussions are unresolved' do
       project = attributes_for(:project, only_allow_merge_if_all_discussions_are_resolved: false)
 
-      post api("/projects/user/#{user.id}", admin), project
+      post api("/projects/user/#{user.id}", admin), params: project
 
       expect(json_response['only_allow_merge_if_all_discussions_are_resolved']).to be_falsey
     end
@@ -863,7 +863,7 @@
     it 'sets a project as allowing merge only if all discussions are resolved' do
       project = attributes_for(:project, only_allow_merge_if_all_discussions_are_resolved: true)
 
-      post api("/projects/user/#{user.id}", admin), project
+      post api("/projects/user/#{user.id}", admin), params: project
 
       expect(json_response['only_allow_merge_if_all_discussions_are_resolved']).to be_truthy
     end
@@ -875,7 +875,7 @@
     end
 
     it "uploads the file and returns its info" do
-      post api("/projects/#{project.id}/uploads", user), file: fixture_file_upload("spec/fixtures/dk.png", "image/png")
+      post api("/projects/#{project.id}/uploads", user), params: { file: fixture_file_upload("spec/fixtures/dk.png", "image/png") }
 
       expect(response).to have_gitlab_http_status(201)
       expect(json_response['alt']).to eq("dk")
@@ -1070,7 +1070,7 @@
       end
 
       it 'includes license fields when requested' do
-        get api("/projects/#{project.id}", user), license: true
+        get api("/projects/#{project.id}", user), params: { license: true }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['license']).to eq({
@@ -1090,7 +1090,7 @@
       end
 
       it "includes statistics if requested" do
-        get api("/projects/#{project.id}", user), statistics: true
+        get api("/projects/#{project.id}", user), params: { statistics: true }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response).to include 'statistics'
@@ -1447,7 +1447,7 @@
       expires_at = 10.days.from_now.to_date
 
       expect do
-        post api("/projects/#{project.id}/share", user), group_id: group.id, group_access: Gitlab::Access::DEVELOPER, expires_at: expires_at
+        post api("/projects/#{project.id}/share", user), params: { group_id: group.id, group_access: Gitlab::Access::DEVELOPER, expires_at: expires_at }
       end.to change { ProjectGroupLink.count }.by(1)
 
       expect(response).to have_gitlab_http_status(201)
@@ -1457,37 +1457,37 @@
     end
 
     it "returns a 400 error when group id is not given" do
-      post api("/projects/#{project.id}/share", user), group_access: Gitlab::Access::DEVELOPER
+      post api("/projects/#{project.id}/share", user), params: { group_access: Gitlab::Access::DEVELOPER }
       expect(response).to have_gitlab_http_status(400)
     end
 
     it "returns a 400 error when access level is not given" do
-      post api("/projects/#{project.id}/share", user), group_id: group.id
+      post api("/projects/#{project.id}/share", user), params: { group_id: group.id }
       expect(response).to have_gitlab_http_status(400)
     end
 
     it "returns a 400 error when sharing is disabled" do
       project.namespace.update(share_with_group_lock: true)
-      post api("/projects/#{project.id}/share", user), group_id: group.id, group_access: Gitlab::Access::DEVELOPER
+      post api("/projects/#{project.id}/share", user), params: { group_id: group.id, group_access: Gitlab::Access::DEVELOPER }
       expect(response).to have_gitlab_http_status(400)
     end
 
     it 'returns a 404 error when user cannot read group' do
       private_group = create(:group, :private)
 
-      post api("/projects/#{project.id}/share", user), group_id: private_group.id, group_access: Gitlab::Access::DEVELOPER
+      post api("/projects/#{project.id}/share", user), params: { group_id: private_group.id, group_access: Gitlab::Access::DEVELOPER }
 
       expect(response).to have_gitlab_http_status(404)
     end
 
     it 'returns a 404 error when group does not exist' do
-      post api("/projects/#{project.id}/share", user), group_id: 1234, group_access: Gitlab::Access::DEVELOPER
+      post api("/projects/#{project.id}/share", user), params: { group_id: 1234, group_access: Gitlab::Access::DEVELOPER }
 
       expect(response).to have_gitlab_http_status(404)
     end
 
     it "returns a 400 error when wrong params passed" do
-      post api("/projects/#{project.id}/share", user), group_id: group.id, group_access: 1234
+      post api("/projects/#{project.id}/share", user), params: { group_id: group.id, group_access: 1234 }
 
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['error']).to eq 'group_access does not have a valid value'
@@ -1555,7 +1555,7 @@
     it 'returns 400 when nothing sent' do
       project_param = {}
 
-      put api("/projects/#{project.id}", user), project_param
+      put api("/projects/#{project.id}", user), params: project_param
 
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['error']).to match('at least one parameter must be provided')
@@ -1565,7 +1565,7 @@
       it 'returns authentication error' do
         project_param = { name: 'bar' }
 
-        put api("/projects/#{project.id}"), project_param
+        put api("/projects/#{project.id}"), params: project_param
 
         expect(response).to have_gitlab_http_status(401)
       end
@@ -1575,7 +1575,7 @@
       it 'updates name' do
         project_param = { name: 'bar' }
 
-        put api("/projects/#{project.id}", user), project_param
+        put api("/projects/#{project.id}", user), params: project_param
 
         expect(response).to have_gitlab_http_status(200)
 
@@ -1587,7 +1587,7 @@
       it 'updates visibility_level' do
         project_param = { visibility: 'public' }
 
-        put api("/projects/#{project3.id}", user), project_param
+        put api("/projects/#{project3.id}", user), params: project_param
 
         expect(response).to have_gitlab_http_status(200)
 
@@ -1600,7 +1600,7 @@
         project3.update({ visibility_level: Gitlab::VisibilityLevel::PUBLIC })
         project_param = { visibility: 'private' }
 
-        put api("/projects/#{project3.id}", user), project_param
+        put api("/projects/#{project3.id}", user), params: project_param
 
         expect(response).to have_gitlab_http_status(200)
 
@@ -1614,7 +1614,7 @@
       it 'does not update name to existing name' do
         project_param = { name: project3.name }
 
-        put api("/projects/#{project.id}", user), project_param
+        put api("/projects/#{project.id}", user), params: project_param
 
         expect(response).to have_gitlab_http_status(400)
         expect(json_response['message']['name']).to eq(['has already been taken'])
@@ -1623,7 +1623,7 @@
       it 'updates request_access_enabled' do
         project_param = { request_access_enabled: false }
 
-        put api("/projects/#{project.id}", user), project_param
+        put api("/projects/#{project.id}", user), params: project_param
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['request_access_enabled']).to eq(false)
@@ -1641,7 +1641,7 @@
       it 'updates path & name to existing path & name in different namespace' do
         project_param = { path: project4.path, name: project4.name }
 
-        put api("/projects/#{project3.id}", user), project_param
+        put api("/projects/#{project3.id}", user), params: project_param
 
         expect(response).to have_gitlab_http_status(200)
 
@@ -1653,7 +1653,7 @@
       it 'updates jobs_enabled' do
         project_param = { jobs_enabled: true }
 
-        put api("/projects/#{project3.id}", user), project_param
+        put api("/projects/#{project3.id}", user), params: project_param
 
         expect(response).to have_gitlab_http_status(200)
 
@@ -1665,7 +1665,7 @@
       it 'updates merge_method' do
         project_param = { merge_method: 'ff' }
 
-        put api("/projects/#{project3.id}", user), project_param
+        put api("/projects/#{project3.id}", user), params: project_param
 
         expect(response).to have_gitlab_http_status(200)
 
@@ -1677,7 +1677,7 @@
       it 'rejects to update merge_method when merge_method is invalid' do
         project_param = { merge_method: 'invalid' }
 
-        put api("/projects/#{project3.id}", user), project_param
+        put api("/projects/#{project3.id}", user), params: project_param
 
         expect(response).to have_gitlab_http_status(400)
       end
@@ -1688,7 +1688,7 @@
                                       'image/gif')
         }
 
-        put api("/projects/#{project3.id}", user), project_param
+        put api("/projects/#{project3.id}", user), params: project_param
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['avatar_url']).to eq('http://localhost/uploads/'\
@@ -1700,7 +1700,7 @@
     context 'when authenticated as project maintainer' do
       it 'updates path' do
         project_param = { path: 'bar' }
-        put api("/projects/#{project3.id}", user4), project_param
+        put api("/projects/#{project3.id}", user4), params: project_param
         expect(response).to have_gitlab_http_status(200)
         project_param.each_pair do |k, v|
           expect(json_response[k.to_s]).to eq(v)
@@ -1715,7 +1715,7 @@
                           merge_method: 'ff',
                           description: 'new description' }
 
-        put api("/projects/#{project3.id}", user4), project_param
+        put api("/projects/#{project3.id}", user4), params: project_param
         expect(response).to have_gitlab_http_status(200)
         project_param.each_pair do |k, v|
           expect(json_response[k.to_s]).to eq(v)
@@ -1724,20 +1724,20 @@
 
       it 'does not update path to existing path' do
         project_param = { path: project.path }
-        put api("/projects/#{project3.id}", user4), project_param
+        put api("/projects/#{project3.id}", user4), params: project_param
         expect(response).to have_gitlab_http_status(400)
         expect(json_response['message']['path']).to eq(['has already been taken'])
       end
 
       it 'does not update name' do
         project_param = { name: 'bar' }
-        put api("/projects/#{project3.id}", user4), project_param
+        put api("/projects/#{project3.id}", user4), params: project_param
         expect(response).to have_gitlab_http_status(403)
       end
 
       it 'does not update visibility_level' do
         project_param = { visibility: 'public' }
-        put api("/projects/#{project3.id}", user4), project_param
+        put api("/projects/#{project3.id}", user4), params: project_param
         expect(response).to have_gitlab_http_status(403)
       end
     end
@@ -1751,7 +1751,7 @@
                           merge_requests_enabled: true,
                           description: 'new description',
                           request_access_enabled: true }
-        put api("/projects/#{project.id}", user3), project_param
+        put api("/projects/#{project.id}", user3), params: project_param
         expect(response).to have_gitlab_http_status(403)
       end
     end
@@ -2037,41 +2037,41 @@
       end
 
       it 'forks with explicit own user namespace id' do
-        post api("/projects/#{project.id}/fork", user2), namespace: user2.namespace.id
+        post api("/projects/#{project.id}/fork", user2), params: { namespace: user2.namespace.id }
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['owner']['id']).to eq(user2.id)
       end
 
       it 'forks with explicit own user name as namespace' do
-        post api("/projects/#{project.id}/fork", user2), namespace: user2.username
+        post api("/projects/#{project.id}/fork", user2), params: { namespace: user2.username }
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['owner']['id']).to eq(user2.id)
       end
 
       it 'forks to another user when admin' do
-        post api("/projects/#{project.id}/fork", admin), namespace: user2.username
+        post api("/projects/#{project.id}/fork", admin), params: { namespace: user2.username }
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['owner']['id']).to eq(user2.id)
       end
 
       it 'fails if trying to fork to another user when not admin' do
-        post api("/projects/#{project.id}/fork", user2), namespace: admin.namespace.id
+        post api("/projects/#{project.id}/fork", user2), params: { namespace: admin.namespace.id }
 
         expect(response).to have_gitlab_http_status(404)
       end
 
       it 'fails if trying to fork to non-existent namespace' do
-        post api("/projects/#{project.id}/fork", user2), namespace: 42424242
+        post api("/projects/#{project.id}/fork", user2), params: { namespace: 42424242 }
 
         expect(response).to have_gitlab_http_status(404)
         expect(json_response['message']).to eq('404 Target Namespace Not Found')
       end
 
       it 'forks to owned group' do
-        post api("/projects/#{project.id}/fork", user2), namespace: group2.name
+        post api("/projects/#{project.id}/fork", user2), params: { namespace: group2.name }
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['namespace']['name']).to eq(group2.name)
@@ -2079,7 +2079,7 @@
 
       it 'forks to owned subgroup' do
         full_path = "#{group2.path}/#{group3.path}"
-        post api("/projects/#{project.id}/fork", user2), namespace: full_path
+        post api("/projects/#{project.id}/fork", user2), params: { namespace: full_path }
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['namespace']['name']).to eq(group3.name)
@@ -2087,13 +2087,13 @@
       end
 
       it 'fails to fork to not owned group' do
-        post api("/projects/#{project.id}/fork", user2), namespace: group.name
+        post api("/projects/#{project.id}/fork", user2), params: { namespace: group.name }
 
         expect(response).to have_gitlab_http_status(404)
       end
 
       it 'forks to not owned group when admin' do
-        post api("/projects/#{project.id}/fork", admin), namespace: group.name
+        post api("/projects/#{project.id}/fork", admin), params: { namespace: group.name }
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['namespace']['name']).to eq(group.name)
@@ -2166,19 +2166,19 @@
       it 'transfers the project to the new namespace' do
         group.add_owner(user)
 
-        put api("/projects/#{project.id}/transfer", user), namespace: group.id
+        put api("/projects/#{project.id}/transfer", user), params: { namespace: group.id }
 
         expect(response).to have_gitlab_http_status(200)
       end
 
       it 'fails when transferring to a non owned namespace' do
-        put api("/projects/#{project.id}/transfer", user), namespace: group.id
+        put api("/projects/#{project.id}/transfer", user), params: { namespace: group.id }
 
         expect(response).to have_gitlab_http_status(404)
       end
 
       it 'fails when transferring to an unknown namespace' do
-        put api("/projects/#{project.id}/transfer", user), namespace: 'unknown'
+        put api("/projects/#{project.id}/transfer", user), params: { namespace: 'unknown' }
 
         expect(response).to have_gitlab_http_status(404)
       end
diff --git a/spec/requests/api/protected_branches_spec.rb b/spec/requests/api/protected_branches_spec.rb
index 5d6ff299c127736ec2dc87515bcc63784d95768f..52a9922b225d8f35c1380339d34cb0a671c3c7d6 100644
--- a/spec/requests/api/protected_branches_spec.rb
+++ b/spec/requests/api/protected_branches_spec.rb
@@ -14,7 +14,7 @@
 
     shared_examples_for 'protected branches' do
       it 'returns the protected branches' do
-        get api(route, user), per_page: 100
+        get api(route, user), params: { per_page: 100 }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to include_pagination_headers
@@ -140,7 +140,7 @@ def expect_protection_to_be_successful
       end
 
       it 'protects a single branch' do
-        post post_endpoint, name: branch_name
+        post post_endpoint, params: { name: branch_name }
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['name']).to eq(branch_name)
@@ -150,7 +150,7 @@ def expect_protection_to_be_successful
       end
 
       it 'protects a single branch and developers can push' do
-        post post_endpoint, name: branch_name, push_access_level: 30
+        post post_endpoint, params: { name: branch_name, push_access_level: 30 }
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['name']).to eq(branch_name)
@@ -159,7 +159,7 @@ def expect_protection_to_be_successful
       end
 
       it 'protects a single branch and developers can merge' do
-        post post_endpoint, name: branch_name, merge_access_level: 30
+        post post_endpoint, params: { name: branch_name, merge_access_level: 30 }
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['name']).to eq(branch_name)
@@ -168,7 +168,7 @@ def expect_protection_to_be_successful
       end
 
       it 'protects a single branch and developers can push and merge' do
-        post post_endpoint, name: branch_name, push_access_level: 30, merge_access_level: 30
+        post post_endpoint, params: { name: branch_name, push_access_level: 30, merge_access_level: 30 }
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['name']).to eq(branch_name)
@@ -177,7 +177,7 @@ def expect_protection_to_be_successful
       end
 
       it 'protects a single branch and no one can push' do
-        post post_endpoint, name: branch_name, push_access_level: 0
+        post post_endpoint, params: { name: branch_name, push_access_level: 0 }
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['name']).to eq(branch_name)
@@ -186,7 +186,7 @@ def expect_protection_to_be_successful
       end
 
       it 'protects a single branch and no one can merge' do
-        post post_endpoint, name: branch_name, merge_access_level: 0
+        post post_endpoint, params: { name: branch_name, merge_access_level: 0 }
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['name']).to eq(branch_name)
@@ -205,7 +205,7 @@ def expect_protection_to_be_successful
       end
 
       it 'protects a single branch and no one can push or merge' do
-        post post_endpoint, name: branch_name, push_access_level: 0, merge_access_level: 0
+        post post_endpoint, params: { name: branch_name, push_access_level: 0, merge_access_level: 0 }
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['name']).to eq(branch_name)
@@ -308,7 +308,7 @@ def expect_protection_to_be_successful
       end
 
       it 'returns a 409 error if the same branch is protected twice' do
-        post post_endpoint, name: protected_name
+        post post_endpoint, params: { name: protected_name }
 
         expect(response).to have_gitlab_http_status(409)
       end
@@ -317,7 +317,7 @@ def expect_protection_to_be_successful
         let(:branch_name) { 'feature/*' }
 
         it "protects multiple branches with a wildcard in the name" do
-          post post_endpoint, name: branch_name
+          post post_endpoint, params: { name: branch_name }
 
           expect_protection_to_be_successful
           expect(json_response['push_access_levels'][0]['access_level']).to eq(Gitlab::Access::MAINTAINER)
@@ -332,7 +332,7 @@ def expect_protection_to_be_successful
         end
 
         it "prevents deletion of the protected branch rule" do
-          post post_endpoint, name: branch_name
+          post post_endpoint, params: { name: branch_name }
 
           expect(response).to have_gitlab_http_status(403)
         end
@@ -345,7 +345,7 @@ def expect_protection_to_be_successful
       end
 
       it "returns a 403 error if guest" do
-        post post_endpoint, name: branch_name
+        post post_endpoint, params: { name: branch_name }
 
         expect(response).to have_gitlab_http_status(403)
       end
diff --git a/spec/requests/api/protected_tags_spec.rb b/spec/requests/api/protected_tags_spec.rb
index f4f3ef31bc3a88bce7c740ca88dec738f7a73dc0..41363dcc1c3c1e27d53a90da6eb7eed0e93ba3a1 100644
--- a/spec/requests/api/protected_tags_spec.rb
+++ b/spec/requests/api/protected_tags_spec.rb
@@ -15,7 +15,7 @@
 
     shared_examples_for 'protected tags' do
       it 'returns the protected tags' do
-        get api(route, user), per_page: 100
+        get api(route, user), params: { per_page: 100 }
 
         expect(response).to have_gitlab_http_status(200)
         expect(response).to include_pagination_headers
@@ -102,7 +102,7 @@
       end
 
       it 'protects a single tag with maintainers can create tags' do
-        post api("/projects/#{project.id}/protected_tags", user), name: tag_name
+        post api("/projects/#{project.id}/protected_tags", user), params: { name: tag_name }
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['name']).to eq(tag_name)
@@ -111,7 +111,7 @@
 
       it 'protects a single tag with developers can create tags' do
         post api("/projects/#{project.id}/protected_tags", user),
-            name: tag_name, create_access_level: 30
+            params: { name: tag_name, create_access_level: 30 }
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['name']).to eq(tag_name)
@@ -120,7 +120,7 @@
 
       it 'protects a single tag with no one can create tags' do
         post api("/projects/#{project.id}/protected_tags", user),
-            name: tag_name, create_access_level: 0
+            params: { name: tag_name, create_access_level: 0 }
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['name']).to eq(tag_name)
@@ -128,15 +128,15 @@
       end
 
       it 'returns a 422 error if the same tag is protected twice' do
-        post api("/projects/#{project.id}/protected_tags", user), name: protected_name
+        post api("/projects/#{project.id}/protected_tags", user), params: { name: protected_name }
 
         expect(response).to have_gitlab_http_status(422)
         expect(json_response['message'][0]).to eq('Name has already been taken')
       end
 
       it 'returns 201 if the same tag is proteted on different projects' do
-        post api("/projects/#{project.id}/protected_tags", user), name: protected_name
-        post api("/projects/#{project2.id}/protected_tags", user), name: protected_name
+        post api("/projects/#{project.id}/protected_tags", user), params: { name: protected_name }
+        post api("/projects/#{project2.id}/protected_tags", user), params: { name: protected_name }
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['name']).to eq(protected_name)
@@ -146,7 +146,7 @@
         let(:tag_name) { 'feature/*' }
 
         it 'protects multiple tags with a wildcard in the name' do
-          post api("/projects/#{project.id}/protected_tags", user), name: tag_name
+          post api("/projects/#{project.id}/protected_tags", user), params: { name: tag_name }
 
           expect(response).to have_gitlab_http_status(201)
           expect(json_response['name']).to eq(tag_name)
@@ -161,7 +161,7 @@
       end
 
       it 'returns a 403 error if guest' do
-        post api("/projects/#{project.id}/protected_tags/", user), name: tag_name
+        post api("/projects/#{project.id}/protected_tags/", user), params: { name: tag_name }
 
         expect(response).to have_gitlab_http_status(403)
       end
diff --git a/spec/requests/api/repositories_spec.rb b/spec/requests/api/repositories_spec.rb
index de141377793e7db6a736275fa7ec709d7a4f1308..181fe6246ae20e9eaf007daaff390d462082e98d 100644
--- a/spec/requests/api/repositories_spec.rb
+++ b/spec/requests/api/repositories_spec.rb
@@ -297,7 +297,7 @@
         expect(::Gitlab::Git::Compare).to receive(:new).with(anything, anything, anything, {
           straight: false
         }).and_call_original
-        get api(route, current_user), from: 'master', to: 'feature'
+        get api(route, current_user), params: { from: 'master', to: 'feature' }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['commits']).to be_present
@@ -308,7 +308,7 @@
         expect(::Gitlab::Git::Compare).to receive(:new).with(anything, anything, anything, {
           straight: false
         }).and_call_original
-        get api(route, current_user), from: 'master', to: 'feature', straight: false
+        get api(route, current_user), params: { from: 'master', to: 'feature', straight: false }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['commits']).to be_present
@@ -319,7 +319,7 @@
         expect(::Gitlab::Git::Compare).to receive(:new).with(anything, anything, anything, {
           straight: true
         }).and_call_original
-        get api(route, current_user), from: 'master', to: 'feature', straight: true
+        get api(route, current_user), params: { from: 'master', to: 'feature', straight: true }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['commits']).to be_present
@@ -327,7 +327,7 @@
       end
 
       it "compares tags" do
-        get api(route, current_user), from: 'v1.0.0', to: 'v1.1.0'
+        get api(route, current_user), params: { from: 'v1.0.0', to: 'v1.1.0' }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['commits']).to be_present
@@ -335,7 +335,7 @@
       end
 
       it "compares commits" do
-        get api(route, current_user), from: sample_commit.id, to: sample_commit.parent_id
+        get api(route, current_user), params: { from: sample_commit.id, to: sample_commit.parent_id }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['commits']).to be_empty
@@ -344,7 +344,7 @@
       end
 
       it "compares commits in reverse order" do
-        get api(route, current_user), from: sample_commit.parent_id, to: sample_commit.id
+        get api(route, current_user), params: { from: sample_commit.parent_id, to: sample_commit.id }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['commits']).to be_present
@@ -352,7 +352,7 @@
       end
 
       it "compares same refs" do
-        get api(route, current_user), from: 'master', to: 'master'
+        get api(route, current_user), params: { from: 'master', to: 'master' }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['commits']).to be_empty
@@ -410,7 +410,7 @@
       context 'using sorting' do
         context 'by commits desc' do
           it 'returns the repository contribuors sorted by commits desc' do
-            get api(route, current_user), { order_by: 'commits', sort: 'desc' }
+            get api(route, current_user), params: { order_by: 'commits', sort: 'desc' }
 
             expect(response).to have_gitlab_http_status(200)
             expect(response).to match_response_schema('contributors')
@@ -420,7 +420,7 @@
 
         context 'by name desc' do
           it 'returns the repository contribuors sorted by name asc case insensitive' do
-            get api(route, current_user), { order_by: 'name', sort: 'asc' }
+            get api(route, current_user), params: { order_by: 'name', sort: 'asc' }
 
             expect(response).to have_gitlab_http_status(200)
             expect(response).to match_response_schema('contributors')
@@ -478,7 +478,7 @@
     end
 
     subject(:request) do
-      get(api("/projects/#{project.id}/repository/merge_base", current_user), refs: refs)
+      get(api("/projects/#{project.id}/repository/merge_base", current_user), params: { refs: refs })
     end
 
     shared_examples 'merge base' do
diff --git a/spec/requests/api/runner_spec.rb b/spec/requests/api/runner_spec.rb
index 3e5166d231a15cce397b2b5ed6cfef2e6773ad5c..575cfd2ed2e9c0b4a9c7045639a60262e577bdaa 100644
--- a/spec/requests/api/runner_spec.rb
+++ b/spec/requests/api/runner_spec.rb
@@ -25,7 +25,7 @@
 
       context 'when invalid token is provided' do
         it 'returns 403 error' do
-          post api('/runners'), token: 'invalid'
+          post api('/runners'), params: { token: 'invalid' }
 
           expect(response).to have_gitlab_http_status 403
         end
@@ -33,7 +33,7 @@
 
       context 'when valid token is provided' do
         it 'creates runner with default values' do
-          post api('/runners'), token: registration_token
+          post api('/runners'), params: { token: registration_token }
 
           runner = Ci::Runner.first
 
@@ -50,7 +50,7 @@
           let(:project) { create(:project) }
 
           it 'creates project runner' do
-            post api('/runners'), token: project.runners_token
+            post api('/runners'), params: { token: project.runners_token }
 
             expect(response).to have_gitlab_http_status 201
             expect(project.runners.size).to eq(1)
@@ -65,7 +65,7 @@
           let(:group) { create(:group) }
 
           it 'creates a group runner' do
-            post api('/runners'), token: group.runners_token
+            post api('/runners'), params: { token: group.runners_token }
 
             expect(response).to have_http_status 201
             expect(group.runners.size).to eq(1)
@@ -79,8 +79,10 @@
 
       context 'when runner description is provided' do
         it 'creates runner' do
-          post api('/runners'), token: registration_token,
-                                description: 'server.hostname'
+          post api('/runners'), params: {
+                                  token: registration_token,
+                                  description: 'server.hostname'
+                                }
 
           expect(response).to have_gitlab_http_status 201
           expect(Ci::Runner.first.description).to eq('server.hostname')
@@ -89,8 +91,10 @@
 
       context 'when runner tags are provided' do
         it 'creates runner' do
-          post api('/runners'), token: registration_token,
-                                tag_list: 'tag1, tag2'
+          post api('/runners'), params: {
+                                  token: registration_token,
+                                  tag_list: 'tag1, tag2'
+                                }
 
           expect(response).to have_gitlab_http_status 201
           expect(Ci::Runner.first.tag_list.sort).to eq(%w(tag1 tag2))
@@ -100,9 +104,11 @@
       context 'when option for running untagged jobs is provided' do
         context 'when tags are provided' do
           it 'creates runner' do
-            post api('/runners'), token: registration_token,
-                                  run_untagged: false,
-                                  tag_list: ['tag']
+            post api('/runners'), params: {
+                                    token: registration_token,
+                                    run_untagged: false,
+                                    tag_list: ['tag']
+                                  }
 
             expect(response).to have_gitlab_http_status 201
             expect(Ci::Runner.first.run_untagged).to be false
@@ -112,8 +118,10 @@
 
         context 'when tags are not provided' do
           it 'returns 400 error' do
-            post api('/runners'), token: registration_token,
-                                  run_untagged: false
+            post api('/runners'), params: {
+                                    token: registration_token,
+                                    run_untagged: false
+                                  }
 
             expect(response).to have_gitlab_http_status 400
             expect(json_response['message']).to include(
@@ -124,8 +132,10 @@
 
       context 'when option for locking Runner is provided' do
         it 'creates runner' do
-          post api('/runners'), token: registration_token,
-                                locked: true
+          post api('/runners'), params: {
+                                  token: registration_token,
+                                  locked: true
+                                }
 
           expect(response).to have_gitlab_http_status 201
           expect(Ci::Runner.first.locked).to be true
@@ -135,8 +145,10 @@
       context 'when option for activating a Runner is provided' do
         context 'when active is set to true' do
           it 'creates runner' do
-            post api('/runners'), token: registration_token,
-                                  active: true
+            post api('/runners'), params: {
+                                    token: registration_token,
+                                    active: true
+                                  }
 
             expect(response).to have_gitlab_http_status 201
             expect(Ci::Runner.first.active).to be true
@@ -145,8 +157,10 @@
 
         context 'when active is set to false' do
           it 'creates runner' do
-            post api('/runners'), token: registration_token,
-                                  active: false
+            post api('/runners'), params: {
+                                    token: registration_token,
+                                    active: false
+                                  }
 
             expect(response).to have_gitlab_http_status 201
             expect(Ci::Runner.first.active).to be false
@@ -156,8 +170,10 @@
 
       context 'when maximum job timeout is specified' do
         it 'creates runner' do
-          post api('/runners'), token: registration_token,
-                                maximum_timeout: 9000
+          post api('/runners'), params: {
+                                  token: registration_token,
+                                  maximum_timeout: 9000
+                                }
 
           expect(response).to have_gitlab_http_status 201
           expect(Ci::Runner.first.maximum_timeout).to eq(9000)
@@ -165,8 +181,10 @@
 
         context 'when maximum job timeout is empty' do
           it 'creates runner' do
-            post api('/runners'), token: registration_token,
-                                  maximum_timeout: ''
+            post api('/runners'), params: {
+                                    token: registration_token,
+                                    maximum_timeout: ''
+                                  }
 
             expect(response).to have_gitlab_http_status 201
             expect(Ci::Runner.first.maximum_timeout).to be_nil
@@ -179,8 +197,10 @@
           let(:value) { "#{param}_value" }
 
           it "updates provided Runner's parameter" do
-            post api('/runners'), token: registration_token,
-                                  info: { param => value }
+            post api('/runners'), params: {
+                                    token: registration_token,
+                                    info: { param => value }
+                                  }
 
             expect(response).to have_gitlab_http_status 201
             expect(Ci::Runner.first.read_attribute(param.to_sym)).to eq(value)
@@ -190,8 +210,8 @@
 
       it "sets the runner's ip_address" do
         post api('/runners'),
-          { token: registration_token },
-          { 'REMOTE_ADDR' => '123.111.123.111' }
+          params: { token: registration_token },
+          headers: { 'REMOTE_ADDR' => '123.111.123.111' }
 
         expect(response).to have_gitlab_http_status 201
         expect(Ci::Runner.first.ip_address).to eq('123.111.123.111')
@@ -209,7 +229,7 @@
 
       context 'when invalid token is provided' do
         it 'returns 403 error' do
-          delete api('/runners'), token: 'invalid'
+          delete api('/runners'), params: { token: 'invalid' }
 
           expect(response).to have_gitlab_http_status 403
         end
@@ -219,7 +239,7 @@
         let(:runner) { create(:ci_runner) }
 
         it 'deletes Runner' do
-          delete api('/runners'), token: runner.token
+          delete api('/runners'), params: { token: runner.token }
 
           expect(response).to have_gitlab_http_status 204
           expect(Ci::Runner.count).to eq(0)
@@ -245,7 +265,7 @@
 
       context 'when invalid token is provided' do
         it 'returns 403 error' do
-          post api('/runners/verify'), token: 'invalid-token'
+          post api('/runners/verify'), params: { token: 'invalid-token' }
 
           expect(response).to have_gitlab_http_status 403
         end
@@ -253,7 +273,7 @@
 
       context 'when valid token is provided' do
         it 'verifies Runner credentials' do
-          post api('/runners/verify'), token: runner.token
+          post api('/runners/verify'), params: { token: runner.token }
 
           expect(response).to have_gitlab_http_status 200
         end
@@ -347,7 +367,7 @@
 
       context 'when invalid token is provided' do
         it 'returns 403 error' do
-          post api('/jobs/request'), token: 'invalid'
+          post api('/jobs/request'), params: { token: 'invalid' }
 
           expect(response).to have_gitlab_http_status 403
         end
@@ -504,8 +524,8 @@
 
           it "sets the runner's ip_address" do
             post api('/jobs/request'),
-              { token: runner.token },
-              { 'User-Agent' => user_agent, 'REMOTE_ADDR' => '123.222.123.222' }
+              params: { token: runner.token },
+              headers: { 'User-Agent' => user_agent, 'REMOTE_ADDR' => '123.222.123.222' }
 
             expect(response).to have_gitlab_http_status 201
             expect(runner.reload.ip_address).to eq('123.222.123.222')
@@ -757,7 +777,7 @@
 
         def request_job(token = runner.token, **params)
           new_params = params.merge(token: token, last_update: last_update)
-          post api('/jobs/request'), new_params, { 'User-Agent' => user_agent }
+          post api('/jobs/request'), params: new_params, headers: { 'User-Agent' => user_agent }
         end
       end
     end
@@ -898,7 +918,7 @@ def request_job(token = runner.token, **params)
 
       def update_job(token = job.token, **params)
         new_params = params.merge(token: token)
-        put api("/jobs/#{job.id}"), new_params
+        put api("/jobs/#{job.id}"), params: new_params
       end
 
       def update_job_after_time(update_interval = 20.minutes, state = 'running')
@@ -1118,7 +1138,7 @@ def patch_the_trace(content = ' appended', request_headers = nil)
         end
 
         Timecop.travel(job.updated_at + update_interval) do
-          patch api("/jobs/#{job.id}/trace"), content, request_headers
+          patch api("/jobs/#{job.id}/trace"), params: content, headers: request_headers
           job.reload
         end
       end
@@ -1249,7 +1269,7 @@ def force_patch_the_trace
         end
 
         def authorize_artifacts(params = {}, request_headers = headers)
-          post api("/jobs/#{job.id}/artifacts/authorize"), params, request_headers
+          post api("/jobs/#{job.id}/artifacts/authorize"), params: params, headers: request_headers
         end
 
         def authorize_artifacts_with_token_in_params(params = {}, request_headers = headers)
@@ -1352,7 +1372,7 @@ def authorize_artifacts_with_token_in_headers(params = {}, request_headers = hea
 
           context 'when artifacts post request does not contain file' do
             it 'fails to post artifacts without file' do
-              post api("/jobs/#{job.id}/artifacts"), {}, headers_with_token
+              post api("/jobs/#{job.id}/artifacts"), params: {}, headers: headers_with_token
 
               expect(response).to have_gitlab_http_status(400)
             end
@@ -1360,7 +1380,7 @@ def authorize_artifacts_with_token_in_headers(params = {}, request_headers = hea
 
           context 'GitLab Workhorse is not configured' do
             it 'fails to post artifacts without GitLab-Workhorse' do
-              post api("/jobs/#{job.id}/artifacts"), { token: job.token }, {}
+              post api("/jobs/#{job.id}/artifacts"), params: { token: job.token }, headers: {}
 
               expect(response).to have_gitlab_http_status(403)
             end
@@ -1377,7 +1397,7 @@ def authorize_artifacts_with_token_in_headers(params = {}, request_headers = hea
             before do
               stub_application_setting(default_artifacts_expire_in: default_artifacts_expire_in)
 
-              post(api("/jobs/#{job.id}/artifacts"), post_data, headers_with_token)
+              post(api("/jobs/#{job.id}/artifacts"), params: post_data, headers: headers_with_token)
             end
 
             context 'when an expire_in is given' do
@@ -1432,7 +1452,7 @@ def authorize_artifacts_with_token_in_headers(params = {}, request_headers = hea
             let(:stored_metadata_sha256) { job.reload.job_artifacts_metadata.file_sha256 }
 
             before do
-              post(api("/jobs/#{job.id}/artifacts"), post_data, headers_with_token)
+              post(api("/jobs/#{job.id}/artifacts"), params: post_data, headers: headers_with_token)
             end
 
             context 'when posts data accelerated by workhorse is correct' do
@@ -1550,7 +1570,7 @@ def upload_artifacts(file, headers = {}, params = {})
             'file.name' => file.original_filename
           })
 
-          post api("/jobs/#{job.id}/artifacts"), params, headers
+          post api("/jobs/#{job.id}/artifacts"), params: params, headers: headers
         end
       end
 
@@ -1636,7 +1656,7 @@ def download_artifact(params = {}, request_headers = headers)
           params = params.merge(token: token)
           job.reload
 
-          get api("/jobs/#{job.id}/artifacts"), params, request_headers
+          get api("/jobs/#{job.id}/artifacts"), params: params, headers: request_headers
         end
       end
     end
diff --git a/spec/requests/api/runners_spec.rb b/spec/requests/api/runners_spec.rb
index 49a79d2ccf97598cd25c4f1d074ea943c9759013..7f11c8c9fe8934dfa9a28e268056ce2ba48751f6 100644
--- a/spec/requests/api/runners_spec.rb
+++ b/spec/requests/api/runners_spec.rb
@@ -400,14 +400,14 @@
       end
 
       def update_runner(id, user, args)
-        put api("/runners/#{id}", user), args
+        put api("/runners/#{id}", user), params: args
       end
     end
 
     context 'authorized user' do
       context 'when runner is shared' do
         it 'does not update runner' do
-          put api("/runners/#{shared_runner.id}", user), description: 'test'
+          put api("/runners/#{shared_runner.id}", user), params: { description: 'test' }
 
           expect(response).to have_gitlab_http_status(403)
         end
@@ -415,14 +415,14 @@ def update_runner(id, user, args)
 
       context 'when runner is not shared' do
         it 'does not update project runner without access to it' do
-          put api("/runners/#{project_runner.id}", user2), description: 'test'
+          put api("/runners/#{project_runner.id}", user2), params: { description: 'test' }
 
           expect(response).to have_http_status(403)
         end
 
         it 'updates project runner with access to it' do
           description = project_runner.description
-          put api("/runners/#{project_runner.id}", admin), description: 'test'
+          put api("/runners/#{project_runner.id}", admin), params: { description: 'test' }
           project_runner.reload
 
           expect(response).to have_gitlab_http_status(200)
@@ -741,14 +741,14 @@ def update_runner(id, user, args)
 
       it 'enables specific runner' do
         expect do
-          post api("/projects/#{project.id}/runners", user), runner_id: project_runner2.id
+          post api("/projects/#{project.id}/runners", user), params: { runner_id: project_runner2.id }
         end.to change { project.runners.count }.by(+1)
         expect(response).to have_gitlab_http_status(201)
       end
 
       it 'avoids changes when enabling already enabled runner' do
         expect do
-          post api("/projects/#{project.id}/runners", user), runner_id: project_runner.id
+          post api("/projects/#{project.id}/runners", user), params: { runner_id: project_runner.id }
         end.to change { project.runners.count }.by(0)
         expect(response).to have_gitlab_http_status(400)
       end
@@ -757,20 +757,20 @@ def update_runner(id, user, args)
         project_runner2.update(locked: true)
 
         expect do
-          post api("/projects/#{project.id}/runners", user), runner_id: project_runner2.id
+          post api("/projects/#{project.id}/runners", user), params: { runner_id: project_runner2.id }
         end.to change { project.runners.count }.by(0)
 
         expect(response).to have_gitlab_http_status(403)
       end
 
       it 'does not enable shared runner' do
-        post api("/projects/#{project.id}/runners", user), runner_id: shared_runner.id
+        post api("/projects/#{project.id}/runners", user), params: { runner_id: shared_runner.id }
 
         expect(response).to have_gitlab_http_status(403)
       end
 
       it 'does not enable group runner' do
-        post api("/projects/#{project.id}/runners", user), runner_id: group_runner.id
+        post api("/projects/#{project.id}/runners", user), params: { runner_id: group_runner.id }
 
         expect(response).to have_http_status(403)
       end
@@ -781,7 +781,7 @@ def update_runner(id, user, args)
 
           it 'enables any specific runner' do
             expect do
-              post api("/projects/#{project.id}/runners", admin), runner_id: new_project_runner.id
+              post api("/projects/#{project.id}/runners", admin), params: { runner_id: new_project_runner.id }
             end.to change { project.runners.count }.by(+1)
             expect(response).to have_gitlab_http_status(201)
           end
@@ -789,7 +789,7 @@ def update_runner(id, user, args)
 
         it 'enables a instance type runner' do
           expect do
-            post api("/projects/#{project.id}/runners", admin), runner_id: shared_runner.id
+            post api("/projects/#{project.id}/runners", admin), params: { runner_id: shared_runner.id }
           end.to change { project.runners.count }.by(1)
 
           expect(shared_runner.reload).not_to be_instance_type
@@ -808,7 +808,7 @@ def update_runner(id, user, args)
       let!(:new_project_runner) { create(:ci_runner, :project) }
 
       it 'does not enable runner without access to' do
-        post api("/projects/#{project.id}/runners", user), runner_id: new_project_runner.id
+        post api("/projects/#{project.id}/runners", user), params: { runner_id: new_project_runner.id }
 
         expect(response).to have_gitlab_http_status(403)
       end
diff --git a/spec/requests/api/search_spec.rb b/spec/requests/api/search_spec.rb
index f8e468be170928a87c109ca19a1e62c3417e725f..831f47debeb3274289709e5c99626488a7a31017 100644
--- a/spec/requests/api/search_spec.rb
+++ b/spec/requests/api/search_spec.rb
@@ -16,7 +16,7 @@
   describe 'GET /search'  do
     context 'when user is not authenticated' do
       it 'returns 401 error' do
-        get api('/search'), scope: 'projects', search: 'awesome'
+        get api('/search'), params: { scope: 'projects', search: 'awesome' }
 
         expect(response).to have_gitlab_http_status(401)
       end
@@ -24,7 +24,7 @@
 
     context 'when scope is not supported' do
       it 'returns 400 error' do
-        get api('/search', user), scope: 'unsupported', search: 'awesome'
+        get api('/search', user), params: { scope: 'unsupported', search: 'awesome' }
 
         expect(response).to have_gitlab_http_status(400)
       end
@@ -32,7 +32,7 @@
 
     context 'when scope is missing' do
       it 'returns 400 error' do
-        get api('/search', user), search: 'awesome'
+        get api('/search', user), params: { search: 'awesome' }
 
         expect(response).to have_gitlab_http_status(400)
       end
@@ -41,7 +41,7 @@
     context 'with correct params' do
       context 'for projects scope' do
         before do
-          get api('/search', user), scope: 'projects', search: 'awesome'
+          get api('/search', user), params: { scope: 'projects', search: 'awesome' }
         end
 
         it_behaves_like 'response is correct', schema: 'public_api/v4/projects'
@@ -51,7 +51,7 @@
         before do
           create(:issue, project: project, title: 'awesome issue')
 
-          get api('/search', user), scope: 'issues', search: 'awesome'
+          get api('/search', user), params: { scope: 'issues', search: 'awesome' }
         end
 
         it_behaves_like 'response is correct', schema: 'public_api/v4/issues'
@@ -61,7 +61,7 @@
         before do
           create(:merge_request, source_project: repo_project, title: 'awesome mr')
 
-          get api('/search', user), scope: 'merge_requests', search: 'awesome'
+          get api('/search', user), params: { scope: 'merge_requests', search: 'awesome' }
         end
 
         it_behaves_like 'response is correct', schema: 'public_api/v4/merge_requests'
@@ -71,7 +71,7 @@
         before do
           create(:milestone, project: project, title: 'awesome milestone')
 
-          get api('/search', user), scope: 'milestones', search: 'awesome'
+          get api('/search', user), params: { scope: 'milestones', search: 'awesome' }
         end
 
         it_behaves_like 'response is correct', schema: 'public_api/v4/milestones'
@@ -81,7 +81,7 @@
         before do
           create(:snippet, :public, title: 'awesome snippet', content: 'snippet content')
 
-          get api('/search', user), scope: 'snippet_titles', search: 'awesome'
+          get api('/search', user), params: { scope: 'snippet_titles', search: 'awesome' }
         end
 
         it_behaves_like 'response is correct', schema: 'public_api/v4/snippets'
@@ -91,7 +91,7 @@
         before do
           create(:snippet, :public, title: 'awesome snippet', content: 'snippet content')
 
-          get api('/search', user), scope: 'snippet_blobs', search: 'content'
+          get api('/search', user), params: { scope: 'snippet_blobs', search: 'content' }
         end
 
         it_behaves_like 'response is correct', schema: 'public_api/v4/snippets'
@@ -102,7 +102,7 @@
   describe "GET /groups/:id/search" do
     context 'when user is not authenticated' do
       it 'returns 401 error' do
-        get api("/groups/#{group.id}/search"), scope: 'projects', search: 'awesome'
+        get api("/groups/#{group.id}/search"), params: { scope: 'projects', search: 'awesome' }
 
         expect(response).to have_gitlab_http_status(401)
       end
@@ -110,7 +110,7 @@
 
     context 'when scope is not supported' do
       it 'returns 400 error' do
-        get api("/groups/#{group.id}/search", user), scope: 'unsupported', search: 'awesome'
+        get api("/groups/#{group.id}/search", user), params: { scope: 'unsupported', search: 'awesome' }
 
         expect(response).to have_gitlab_http_status(400)
       end
@@ -118,7 +118,7 @@
 
     context 'when scope is missing' do
       it 'returns 400 error' do
-        get api("/groups/#{group.id}/search", user), search: 'awesome'
+        get api("/groups/#{group.id}/search", user), params: { search: 'awesome' }
 
         expect(response).to have_gitlab_http_status(400)
       end
@@ -126,7 +126,7 @@
 
     context 'when group does not exist' do
       it 'returns 404 error' do
-        get api('/groups/9999/search', user), scope: 'issues', search: 'awesome'
+        get api('/groups/9999/search', user), params: { scope: 'issues', search: 'awesome' }
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -136,7 +136,7 @@
       it 'returns 404 error' do
         private_group = create(:group, :private)
 
-        get api("/groups/#{private_group.id}/search", user), scope: 'issues', search: 'awesome'
+        get api("/groups/#{private_group.id}/search", user), params: { scope: 'issues', search: 'awesome' }
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -145,7 +145,7 @@
     context 'with correct params' do
       context 'for projects scope' do
         before do
-          get api("/groups/#{group.id}/search", user), scope: 'projects', search: 'awesome'
+          get api("/groups/#{group.id}/search", user), params: { scope: 'projects', search: 'awesome' }
         end
 
         it_behaves_like 'response is correct', schema: 'public_api/v4/projects'
@@ -155,7 +155,7 @@
         before do
           create(:issue, project: project, title: 'awesome issue')
 
-          get api("/groups/#{group.id}/search", user), scope: 'issues', search: 'awesome'
+          get api("/groups/#{group.id}/search", user), params: { scope: 'issues', search: 'awesome' }
         end
 
         it_behaves_like 'response is correct', schema: 'public_api/v4/issues'
@@ -165,7 +165,7 @@
         before do
           create(:merge_request, source_project: repo_project, title: 'awesome mr')
 
-          get api("/groups/#{group.id}/search", user), scope: 'merge_requests', search: 'awesome'
+          get api("/groups/#{group.id}/search", user), params: { scope: 'merge_requests', search: 'awesome' }
         end
 
         it_behaves_like 'response is correct', schema: 'public_api/v4/merge_requests'
@@ -175,7 +175,7 @@
         before do
           create(:milestone, project: project, title: 'awesome milestone')
 
-          get api("/groups/#{group.id}/search", user), scope: 'milestones', search: 'awesome'
+          get api("/groups/#{group.id}/search", user), params: { scope: 'milestones', search: 'awesome' }
         end
 
         it_behaves_like 'response is correct', schema: 'public_api/v4/milestones'
@@ -187,7 +187,7 @@
           create(:milestone, project: project, title: 'awesome milestone')
           create(:milestone, project: another_project, title: 'awesome milestone other project')
 
-          get api("/groups/#{CGI.escape(group.full_path)}/search", user), scope: 'milestones', search: 'awesome'
+          get api("/groups/#{CGI.escape(group.full_path)}/search", user), params: { scope: 'milestones', search: 'awesome' }
         end
 
         it_behaves_like 'response is correct', schema: 'public_api/v4/milestones'
@@ -198,7 +198,7 @@
   describe "GET /projects/:id/search" do
     context 'when user is not authenticated' do
       it 'returns 401 error' do
-        get api("/projects/#{project.id}/search"), scope: 'issues', search: 'awesome'
+        get api("/projects/#{project.id}/search"), params: { scope: 'issues', search: 'awesome' }
 
         expect(response).to have_gitlab_http_status(401)
       end
@@ -206,7 +206,7 @@
 
     context 'when scope is not supported' do
       it 'returns 400 error' do
-        get api("/projects/#{project.id}/search", user), scope: 'unsupported', search: 'awesome'
+        get api("/projects/#{project.id}/search", user), params: { scope: 'unsupported', search: 'awesome' }
 
         expect(response).to have_gitlab_http_status(400)
       end
@@ -214,7 +214,7 @@
 
     context 'when scope is missing' do
       it 'returns 400 error' do
-        get api("/projects/#{project.id}/search", user), search: 'awesome'
+        get api("/projects/#{project.id}/search", user), params: { search: 'awesome' }
 
         expect(response).to have_gitlab_http_status(400)
       end
@@ -222,7 +222,7 @@
 
     context 'when project does not exist' do
       it 'returns 404 error' do
-        get api('/projects/9999/search', user), scope: 'issues', search: 'awesome'
+        get api('/projects/9999/search', user), params: { scope: 'issues', search: 'awesome' }
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -232,7 +232,7 @@
       it 'returns 404 error' do
         project.update!(visibility_level: Gitlab::VisibilityLevel::PRIVATE)
 
-        get api("/projects/#{project.id}/search", user), scope: 'issues', search: 'awesome'
+        get api("/projects/#{project.id}/search", user), params: { scope: 'issues', search: 'awesome' }
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -243,7 +243,7 @@
         before do
           create(:issue, project: project, title: 'awesome issue')
 
-          get api("/projects/#{project.id}/search", user), scope: 'issues', search: 'awesome'
+          get api("/projects/#{project.id}/search", user), params: { scope: 'issues', search: 'awesome' }
         end
 
         it_behaves_like 'response is correct', schema: 'public_api/v4/issues'
@@ -253,7 +253,7 @@
         before do
           create(:merge_request, source_project: repo_project, title: 'awesome mr')
 
-          get api("/projects/#{repo_project.id}/search", user), scope: 'merge_requests', search: 'awesome'
+          get api("/projects/#{repo_project.id}/search", user), params: { scope: 'merge_requests', search: 'awesome' }
         end
 
         it_behaves_like 'response is correct', schema: 'public_api/v4/merge_requests'
@@ -263,7 +263,7 @@
         before do
           create(:milestone, project: project, title: 'awesome milestone')
 
-          get api("/projects/#{project.id}/search", user), scope: 'milestones', search: 'awesome'
+          get api("/projects/#{project.id}/search", user), params: { scope: 'milestones', search: 'awesome' }
         end
 
         it_behaves_like 'response is correct', schema: 'public_api/v4/milestones'
@@ -273,7 +273,7 @@
         before do
           create(:note_on_merge_request, project: project, note: 'awesome note')
 
-          get api("/projects/#{project.id}/search", user), scope: 'notes', search: 'awesome'
+          get api("/projects/#{project.id}/search", user), params: { scope: 'notes', search: 'awesome' }
         end
 
         it_behaves_like 'response is correct', schema: 'public_api/v4/notes'
@@ -284,7 +284,7 @@
           wiki = create(:project_wiki, project: project)
           create(:wiki_page, wiki: wiki, attrs: { title: 'home', content: "Awesome page" })
 
-          get api("/projects/#{project.id}/search", user), scope: 'wiki_blobs', search: 'awesome'
+          get api("/projects/#{project.id}/search", user), params: { scope: 'wiki_blobs', search: 'awesome' }
         end
 
         it_behaves_like 'response is correct', schema: 'public_api/v4/blobs'
@@ -292,7 +292,7 @@
 
       context 'for commits scope' do
         before do
-          get api("/projects/#{repo_project.id}/search", user), scope: 'commits', search: '498214de67004b1da3d820901307bed2a68a8ef6'
+          get api("/projects/#{repo_project.id}/search", user), params: { scope: 'commits', search: '498214de67004b1da3d820901307bed2a68a8ef6' }
         end
 
         it_behaves_like 'response is correct', schema: 'public_api/v4/commits_details'
@@ -300,7 +300,7 @@
 
       context 'for commits scope with project path as id' do
         before do
-          get api("/projects/#{CGI.escape(repo_project.full_path)}/search", user), scope: 'commits', search: '498214de67004b1da3d820901307bed2a68a8ef6'
+          get api("/projects/#{CGI.escape(repo_project.full_path)}/search", user), params: { scope: 'commits', search: '498214de67004b1da3d820901307bed2a68a8ef6' }
         end
 
         it_behaves_like 'response is correct', schema: 'public_api/v4/commits_details'
@@ -308,14 +308,14 @@
 
       context 'for blobs scope' do
         before do
-          get api("/projects/#{repo_project.id}/search", user), scope: 'blobs', search: 'monitors'
+          get api("/projects/#{repo_project.id}/search", user), params: { scope: 'blobs', search: 'monitors' }
         end
 
         it_behaves_like 'response is correct', schema: 'public_api/v4/blobs', size: 2
 
         context 'filters' do
           it 'by filename' do
-            get api("/projects/#{repo_project.id}/search", user), scope: 'blobs', search: 'mon filename:PROCESS.md'
+            get api("/projects/#{repo_project.id}/search", user), params: { scope: 'blobs', search: 'mon filename:PROCESS.md' }
 
             expect(response).to have_gitlab_http_status(200)
             expect(json_response.size).to eq(2)
@@ -323,14 +323,14 @@
           end
 
           it 'by path' do
-            get api("/projects/#{repo_project.id}/search", user), scope: 'blobs', search: 'mon path:markdown'
+            get api("/projects/#{repo_project.id}/search", user), params: { scope: 'blobs', search: 'mon path:markdown' }
 
             expect(response).to have_gitlab_http_status(200)
             expect(json_response.size).to eq(8)
           end
 
           it 'by extension' do
-            get api("/projects/#{repo_project.id}/search", user), scope: 'blobs', search: 'mon extension:md'
+            get api("/projects/#{repo_project.id}/search", user), params: { scope: 'blobs', search: 'mon extension:md' }
 
             expect(response).to have_gitlab_http_status(200)
             expect(json_response.size).to eq(11)
diff --git a/spec/requests/api/services_spec.rb b/spec/requests/api/services_spec.rb
index f426378b22a3a9ff530d1beb317ca90d6311a4fe..e4d4d163dacd15809d8d735fa7a9861eac460ada 100644
--- a/spec/requests/api/services_spec.rb
+++ b/spec/requests/api/services_spec.rb
@@ -14,7 +14,7 @@
       include_context service
 
       it "updates #{service} settings" do
-        put api("/projects/#{project.id}/services/#{dashed_service}", user), service_attrs
+        put api("/projects/#{project.id}/services/#{dashed_service}", user), params: service_attrs
 
         expect(response).to have_gitlab_http_status(200)
 
@@ -22,7 +22,7 @@
         event = current_service.event_names.empty? ? "foo" : current_service.event_names.first
         state = current_service[event] || false
 
-        put api("/projects/#{project.id}/services/#{dashed_service}?#{event}=#{!state}", user), service_attrs
+        put api("/projects/#{project.id}/services/#{dashed_service}?#{event}=#{!state}", user), params: service_attrs
 
         expect(response).to have_gitlab_http_status(200)
         expect(project.services.first[event]).not_to eq(state) unless event == "foo"
@@ -44,7 +44,7 @@
           expected_code = 400
         end
 
-        put api("/projects/#{project.id}/services/#{dashed_service}", user), attrs
+        put api("/projects/#{project.id}/services/#{dashed_service}", user), params: attrs
 
         expect(response.status).to eq(expected_code)
       end
@@ -127,7 +127,7 @@
           end
 
           it 'when the service is inactive' do
-            post api("/projects/#{project.id}/services/#{service_name}/trigger"), params
+            post api("/projects/#{project.id}/services/#{service_name}/trigger"), params: params
 
             expect(response).to have_gitlab_http_status(404)
           end
@@ -142,7 +142,7 @@
           end
 
           it 'returns status 200' do
-            post api("/projects/#{project.id}/services/#{service_name}/trigger"), params
+            post api("/projects/#{project.id}/services/#{service_name}/trigger"), params: params
 
             expect(response).to have_gitlab_http_status(200)
           end
@@ -150,7 +150,7 @@
 
         context 'when the project can not be found' do
           it 'returns a generic 404' do
-            post api("/projects/404/services/#{service_name}/trigger"), params
+            post api("/projects/404/services/#{service_name}/trigger"), params: params
 
             expect(response).to have_gitlab_http_status(404)
             expect(json_response["message"]).to eq("404 Service Not Found")
@@ -170,7 +170,7 @@
       end
 
       it 'returns status 200' do
-        post api("/projects/#{project.id}/services/#{service_name}/trigger"), token: 'token', text: 'help'
+        post api("/projects/#{project.id}/services/#{service_name}/trigger"), params: { token: 'token', text: 'help' }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['response_type']).to eq("ephemeral")
@@ -192,7 +192,7 @@
     end
 
     it 'accepts a username for update' do
-      put api("/projects/#{project.id}/services/mattermost", user), params.merge(username: 'new_username')
+      put api("/projects/#{project.id}/services/mattermost", user), params: params.merge(username: 'new_username')
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['properties']['username']).to eq('new_username')
diff --git a/spec/requests/api/settings_spec.rb b/spec/requests/api/settings_spec.rb
index d163f47eeca0ff401cc78bfaa14f0d741f102b4e..9c458e8ca60c48af34aa3375a216f88914c21b60 100644
--- a/spec/requests/api/settings_spec.rb
+++ b/spec/requests/api/settings_spec.rb
@@ -43,27 +43,29 @@
 
       it "updates application settings" do
         put api("/application/settings", admin),
-          default_projects_limit: 3,
-          password_authentication_enabled_for_web: false,
-          repository_storages: ['custom'],
-          plantuml_enabled: true,
-          plantuml_url: 'http://plantuml.example.com',
-          default_snippet_visibility: 'internal',
-          restricted_visibility_levels: ['public'],
-          default_artifacts_expire_in: '2 days',
-          help_page_text: 'custom help text',
-          help_page_hide_commercial_content: true,
-          help_page_support_url: 'http://example.com/help',
-          project_export_enabled: false,
-          rsa_key_restriction: ApplicationSetting::FORBIDDEN_KEY_VALUE,
-          dsa_key_restriction: 2048,
-          ecdsa_key_restriction: 384,
-          ed25519_key_restriction: 256,
-          enforce_terms: true,
-          terms: 'Hello world!',
-          performance_bar_allowed_group_path: group.full_path,
-          instance_statistics_visibility_private: true,
-          diff_max_patch_bytes: 150_000
+          params: {
+            default_projects_limit: 3,
+            password_authentication_enabled_for_web: false,
+            repository_storages: ['custom'],
+            plantuml_enabled: true,
+            plantuml_url: 'http://plantuml.example.com',
+            default_snippet_visibility: 'internal',
+            restricted_visibility_levels: ['public'],
+            default_artifacts_expire_in: '2 days',
+            help_page_text: 'custom help text',
+            help_page_hide_commercial_content: true,
+            help_page_support_url: 'http://example.com/help',
+            project_export_enabled: false,
+            rsa_key_restriction: ApplicationSetting::FORBIDDEN_KEY_VALUE,
+            dsa_key_restriction: 2048,
+            ecdsa_key_restriction: 384,
+            ed25519_key_restriction: 256,
+            enforce_terms: true,
+            terms: 'Hello world!',
+            performance_bar_allowed_group_path: group.full_path,
+            instance_statistics_visibility_private: true,
+            diff_max_patch_bytes: 150_000
+          }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['default_projects_limit']).to eq(3)
@@ -92,7 +94,7 @@
 
     it "supports legacy performance_bar_allowed_group_id" do
       put api("/application/settings", admin),
-        performance_bar_allowed_group_id: group.full_path
+        params: { performance_bar_allowed_group_id: group.full_path }
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['performance_bar_allowed_group_id']).to eq(group.id)
@@ -100,8 +102,10 @@
 
     it "supports legacy performance_bar_enabled" do
       put api("/application/settings", admin),
-        performance_bar_enabled: false,
-        performance_bar_allowed_group_id: group.full_path
+        params: {
+          performance_bar_enabled: false,
+          performance_bar_allowed_group_id: group.full_path
+        }
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['performance_bar_allowed_group_id']).to be_nil
@@ -109,7 +113,7 @@
 
     context "missing plantuml_url value when plantuml_enabled is true" do
       it "returns a blank parameter error message" do
-        put api("/application/settings", admin), plantuml_enabled: true
+        put api("/application/settings", admin), params: { plantuml_enabled: true }
 
         expect(response).to have_gitlab_http_status(400)
         expect(json_response['error']).to eq('plantuml_url is missing')
diff --git a/spec/requests/api/snippets_spec.rb b/spec/requests/api/snippets_spec.rb
index c546ba3e127d902031fd53792dda764fa0d5ce31..7c8512f7589143ad0d717d647dafb4f9fb28659d 100644
--- a/spec/requests/api/snippets_spec.rb
+++ b/spec/requests/api/snippets_spec.rb
@@ -143,7 +143,7 @@
 
     it 'creates a new snippet' do
       expect do
-        post api("/snippets/", user), params
+        post api("/snippets/", user), params: params
       end.to change { PersonalSnippet.count }.by(1)
 
       expect(response).to have_gitlab_http_status(201)
@@ -156,14 +156,14 @@
     it 'returns 400 for missing parameters' do
       params.delete(:title)
 
-      post api("/snippets/", user), params
+      post api("/snippets/", user), params: params
 
       expect(response).to have_gitlab_http_status(400)
     end
 
     context 'when the snippet is spam' do
       def create_snippet(snippet_params = {})
-        post api('/snippets', user), params.merge(snippet_params)
+        post api('/snippets', user), params: params.merge(snippet_params)
       end
 
       before do
@@ -205,7 +205,7 @@ def create_snippet(snippet_params = {})
       new_content = 'New content'
       new_description = 'New description'
 
-      put api("/snippets/#{snippet.id}", user), content: new_content, description: new_description
+      put api("/snippets/#{snippet.id}", user), params: { content: new_content, description: new_description }
 
       expect(response).to have_gitlab_http_status(200)
       snippet.reload
@@ -214,14 +214,14 @@ def create_snippet(snippet_params = {})
     end
 
     it 'returns 404 for invalid snippet id' do
-      put api("/snippets/1234", user), title: 'foo'
+      put api("/snippets/1234", user), params: { title: 'foo' }
 
       expect(response).to have_gitlab_http_status(404)
       expect(json_response['message']).to eq('404 Snippet Not Found')
     end
 
     it "returns 404 for another user's snippet" do
-      put api("/snippets/#{snippet.id}", other_user), title: 'fubar'
+      put api("/snippets/#{snippet.id}", other_user), params: { title: 'fubar' }
 
       expect(response).to have_gitlab_http_status(404)
       expect(json_response['message']).to eq('404 Snippet Not Found')
@@ -235,7 +235,7 @@ def create_snippet(snippet_params = {})
 
     context 'when the snippet is spam' do
       def update_snippet(snippet_params = {})
-        put api("/snippets/#{snippet.id}", user), snippet_params
+        put api("/snippets/#{snippet.id}", user), params: snippet_params
       end
 
       before do
diff --git a/spec/requests/api/submodules_spec.rb b/spec/requests/api/submodules_spec.rb
index fa447c028c2f2466412646567466eb98c27b54fe..c482a85c68f2373b411c67986d9c0776516f0a27 100644
--- a/spec/requests/api/submodules_spec.rb
+++ b/spec/requests/api/submodules_spec.rb
@@ -31,7 +31,7 @@ def route(submodule = nil)
   describe "PUT /projects/:id/repository/submodule/:submodule" do
     context 'when unauthenticated' do
       it 'returns 401' do
-        put api(route(submodule)), params
+        put api(route(submodule)), params: params
 
         expect(response).to have_gitlab_http_status(401)
       end
@@ -39,7 +39,7 @@ def route(submodule = nil)
 
     context 'when authenticated', 'as a guest' do
       it 'returns 403' do
-        put api(route(submodule), guest), params
+        put api(route(submodule), guest), params: params
 
         expect(response).to have_gitlab_http_status(403)
       end
@@ -53,13 +53,13 @@ def route(submodule = nil)
       end
 
       it 'returns 400 if branch is missing' do
-        put api(route(submodule), user), params.except(:branch)
+        put api(route(submodule), user), params: params.except(:branch)
 
         expect(response).to have_gitlab_http_status(400)
       end
 
       it 'returns 400 if commit_sha is missing' do
-        put api(route(submodule), user), params.except(:commit_sha)
+        put api(route(submodule), user), params: params.except(:commit_sha)
 
         expect(response).to have_gitlab_http_status(400)
       end
@@ -67,7 +67,7 @@ def route(submodule = nil)
       it 'returns the commmit' do
         head_commit = project.repository.commit.id
 
-        put api(route(submodule), user), params
+        put api(route(submodule), user), params: params
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['message']).to eq commit_message
@@ -87,7 +87,7 @@ def route(submodule = nil)
                   .with(any_args, hash_including(submodule: submodule))
                   .and_call_original
 
-          put api(route(encoded_submodule), user), params
+          put api(route(encoded_submodule), user), params: params
 
           expect(response).to have_gitlab_http_status(200)
           expect(json_response['id']).to eq project.repository.commit(branch).id
diff --git a/spec/requests/api/suggestions_spec.rb b/spec/requests/api/suggestions_spec.rb
index 8e9f737fbd5d18ffa5769b806dbc340b1ca431dd..3c2842e572503a419e91647ecc790362f9263a82 100644
--- a/spec/requests/api/suggestions_spec.rb
+++ b/spec/requests/api/suggestions_spec.rb
@@ -38,7 +38,7 @@
       it 'returns 200 with json content' do
         project.add_maintainer(user)
 
-        put api(url, user), id: suggestion.id
+        put api(url, user), params: { id: suggestion.id }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response)
@@ -56,7 +56,7 @@
       it 'returns 400 with json content' do
         project.add_maintainer(user)
 
-        put api(url, user), id: suggestion.id
+        put api(url, user), params: { id: suggestion.id }
 
         expect(response).to have_gitlab_http_status(400)
         expect(json_response).to eq({ 'message' => 'Suggestion is not appliable' })
@@ -73,7 +73,7 @@
       it 'returns 403 with json content' do
         project.add_reporter(user)
 
-        put api(url, user), id: suggestion.id
+        put api(url, user), params: { id: suggestion.id }
 
         expect(response).to have_gitlab_http_status(403)
         expect(json_response).to eq({ 'message' => '403 Forbidden' })
diff --git a/spec/requests/api/system_hooks_spec.rb b/spec/requests/api/system_hooks_spec.rb
index 6c57d443cbf3ce713a83b8ebaf566e8a261eb206..b6e8d74c2e9338d1f7114c7912a40e9b77b0e694 100644
--- a/spec/requests/api/system_hooks_spec.rb
+++ b/spec/requests/api/system_hooks_spec.rb
@@ -45,7 +45,7 @@
   describe "POST /hooks" do
     it "creates new hook" do
       expect do
-        post api("/hooks", admin), url: 'http://example.com'
+        post api("/hooks", admin), params: { url: 'http://example.com' }
       end.to change { SystemHook.count }.by(1)
     end
 
@@ -56,7 +56,7 @@
     end
 
     it "responds with 400 if url is invalid" do
-      post api("/hooks", admin), url: 'hp://mep.mep'
+      post api("/hooks", admin), params: { url: 'hp://mep.mep' }
 
       expect(response).to have_gitlab_http_status(400)
     end
@@ -68,7 +68,7 @@
     end
 
     it 'sets default values for events' do
-      post api('/hooks', admin), url: 'http://mep.mep'
+      post api('/hooks', admin), params: { url: 'http://mep.mep' }
 
       expect(response).to have_gitlab_http_status(201)
       expect(json_response['enable_ssl_verification']).to be true
@@ -79,11 +79,13 @@
 
     it 'sets explicit values for events' do
       post api('/hooks', admin),
-        url: 'http://mep.mep',
-        enable_ssl_verification: false,
-        push_events: true,
-        tag_push_events: true,
-        merge_requests_events: true
+        params: {
+          url: 'http://mep.mep',
+          enable_ssl_verification: false,
+          push_events: true,
+          tag_push_events: true,
+          merge_requests_events: true
+        }
 
       expect(response).to have_http_status(201)
       expect(json_response['enable_ssl_verification']).to be false
diff --git a/spec/requests/api/tags_spec.rb b/spec/requests/api/tags_spec.rb
index 98f995df06fe8c968251f54a29729a3a92cdc4e9..12cfac96d31d5fd2e8a29c35980c66feb378df0a 100644
--- a/spec/requests/api/tags_spec.rb
+++ b/spec/requests/api/tags_spec.rb
@@ -193,7 +193,7 @@
 
     shared_examples_for 'repository new tag' do
       it 'creates a new tag' do
-        post api(route, current_user), tag_name: tag_name, ref: 'master'
+        post api(route, current_user), params: { tag_name: tag_name, ref: 'master' }
 
         expect(response).to have_gitlab_http_status(201)
         expect(response).to match_response_schema('public_api/v4/tag')
@@ -248,26 +248,26 @@
       end
 
       it 'returns 400 if tag name is invalid' do
-        post api(route, current_user), tag_name: 'new design', ref: 'master'
+        post api(route, current_user), params: { tag_name: 'new design', ref: 'master' }
 
         expect(response).to have_gitlab_http_status(400)
         expect(json_response['message']).to eq('Tag name invalid')
       end
 
       it 'returns 400 if tag already exists' do
-        post api(route, current_user), tag_name: 'new_design1', ref: 'master'
+        post api(route, current_user), params: { tag_name: 'new_design1', ref: 'master' }
 
         expect(response).to have_gitlab_http_status(201)
         expect(response).to match_response_schema('public_api/v4/tag')
 
-        post api(route, current_user), tag_name: 'new_design1', ref: 'master'
+        post api(route, current_user), params: { tag_name: 'new_design1', ref: 'master' }
 
         expect(response).to have_gitlab_http_status(400)
         expect(json_response['message']).to eq('Tag new_design1 already exists')
       end
 
       it 'returns 400 if ref name is invalid' do
-        post api(route, current_user), tag_name: 'new_design3', ref: 'foo'
+        post api(route, current_user), params: { tag_name: 'new_design3', ref: 'foo' }
 
         expect(response).to have_gitlab_http_status(400)
         expect(json_response['message']).to eq('Target foo is invalid')
@@ -275,7 +275,7 @@
 
       context 'lightweight tags with release notes' do
         it 'creates a new tag' do
-          post api(route, current_user), tag_name: tag_name, ref: 'master', release_description: 'Wow'
+          post api(route, current_user), params: { tag_name: tag_name, ref: 'master', release_description: 'Wow' }
 
           expect(response).to have_gitlab_http_status(201)
           expect(response).to match_response_schema('public_api/v4/tag')
@@ -294,7 +294,7 @@
           system(*%W(#{Gitlab.config.git.bin_path} --git-dir=#{repo_path} config user.name #{user.name}))
           system(*%W(#{Gitlab.config.git.bin_path} --git-dir=#{repo_path} config user.email #{user.email}))
 
-          post api(route, current_user), tag_name: 'v7.1.0', ref: 'master', message: 'Release 7.1.0'
+          post api(route, current_user), params: { tag_name: 'v7.1.0', ref: 'master', message: 'Release 7.1.0' }
 
           expect(response).to have_gitlab_http_status(201)
           expect(response).to match_response_schema('public_api/v4/tag')
@@ -360,7 +360,7 @@
 
     shared_examples_for 'repository new release' do
       it 'creates description for existing git tag' do
-        post api(route, user), description: description
+        post api(route, user), params: { description: description }
 
         expect(response).to have_gitlab_http_status(201)
         expect(response).to match_response_schema('public_api/v4/release')
@@ -372,7 +372,7 @@
         let(:tag_name) { 'unknown' }
 
         it_behaves_like '404 response' do
-          let(:request) { post api(route, current_user), description: description }
+          let(:request) { post api(route, current_user), params: { description: description } }
           let(:message) { 'Tag does not exist' }
         end
       end
@@ -381,7 +381,7 @@
         include_context 'disabled repository'
 
         it_behaves_like '403 response' do
-          let(:request) { post api(route, current_user), description: description }
+          let(:request) { post api(route, current_user), params: { description: description } }
         end
       end
     end
@@ -404,7 +404,7 @@
         end
 
         it 'returns 409 if there is already a release' do
-          post api(route, user), description: description
+          post api(route, user), params: { description: description }
 
           expect(response).to have_gitlab_http_status(409)
           expect(json_response['message']).to eq('Release already exists')
@@ -426,7 +426,7 @@
         end
 
         it 'updates the release description' do
-          put api(route, current_user), description: new_description
+          put api(route, current_user), params: { description: new_description }
 
           expect(response).to have_gitlab_http_status(200)
           expect(json_response['tag_name']).to eq(tag_name)
@@ -438,7 +438,7 @@
         let(:tag_name) { 'unknown' }
 
         it_behaves_like '404 response' do
-          let(:request) { put api(route, current_user), description: new_description }
+          let(:request) { put api(route, current_user), params: { description: new_description } }
           let(:message) { 'Tag does not exist' }
         end
       end
@@ -447,7 +447,7 @@
         include_context 'disabled repository'
 
         it_behaves_like '403 response' do
-          let(:request) { put api(route, current_user), description: new_description }
+          let(:request) { put api(route, current_user), params: { description: new_description } }
         end
       end
     end
@@ -465,7 +465,7 @@
 
       context 'when release does not exist' do
         it_behaves_like '404 response' do
-          let(:request) { put api(route, current_user), description: new_description }
+          let(:request) { put api(route, current_user), params: { description: new_description } }
           let(:message) { 'Release does not exist' }
         end
       end
diff --git a/spec/requests/api/todos_spec.rb b/spec/requests/api/todos_spec.rb
index b5cf04e7f22e2a2801c5461be6ea7a103c875408..f121a1d3b782ff3c3d40e3051c34e9a0cb91cb69 100644
--- a/spec/requests/api/todos_spec.rb
+++ b/spec/requests/api/todos_spec.rb
@@ -49,7 +49,7 @@
 
       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 @@
         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 @@
 
       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 @@
 
       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 @@
 
       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 @@
 
       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
diff --git a/spec/requests/api/triggers_spec.rb b/spec/requests/api/triggers_spec.rb
index 907b7de7610f99285ae58956a51845f928504c2d..7c015cb9dd798e096ffd8672e3368ce1236eca28 100644
--- a/spec/requests/api/triggers_spec.rb
+++ b/spec/requests/api/triggers_spec.rb
@@ -26,13 +26,13 @@
 
     context 'Handles errors' do
       it 'returns bad request if token is missing' do
-        post api("/projects/#{project.id}/trigger/pipeline"), ref: 'master'
+        post api("/projects/#{project.id}/trigger/pipeline"), params: { ref: 'master' }
 
         expect(response).to have_gitlab_http_status(400)
       end
 
       it 'returns not found if project is not found' do
-        post api('/projects/0/trigger/pipeline'), options.merge(ref: 'master')
+        post api('/projects/0/trigger/pipeline'), params: options.merge(ref: 'master')
 
         expect(response).to have_gitlab_http_status(404)
       end
@@ -42,7 +42,7 @@
       let(:pipeline) { project.ci_pipelines.last }
 
       it 'creates pipeline' do
-        post api("/projects/#{project.id}/trigger/pipeline"), options.merge(ref: 'master')
+        post api("/projects/#{project.id}/trigger/pipeline"), params: options.merge(ref: 'master')
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response).to include('id' => pipeline.id)
@@ -52,7 +52,7 @@
       end
 
       it 'returns bad request with no pipeline created if there\'s no commit for that ref' do
-        post api("/projects/#{project.id}/trigger/pipeline"), options.merge(ref: 'other-branch')
+        post api("/projects/#{project.id}/trigger/pipeline"), params: options.merge(ref: 'other-branch')
 
         expect(response).to have_gitlab_http_status(400)
         expect(json_response['message']).to eq('base' => ["Reference not found"])
@@ -64,21 +64,21 @@
         end
 
         it 'validates variables to be a hash' do
-          post api("/projects/#{project.id}/trigger/pipeline"), options.merge(variables: 'value', ref: 'master')
+          post api("/projects/#{project.id}/trigger/pipeline"), params: options.merge(variables: 'value', ref: 'master')
 
           expect(response).to have_gitlab_http_status(400)
           expect(json_response['error']).to eq('variables is invalid')
         end
 
         it 'validates variables needs to be a map of key-valued strings' do
-          post api("/projects/#{project.id}/trigger/pipeline"), options.merge(variables: { key: %w(1 2) }, ref: 'master')
+          post api("/projects/#{project.id}/trigger/pipeline"), params: options.merge(variables: { key: %w(1 2) }, ref: 'master')
 
           expect(response).to have_gitlab_http_status(400)
           expect(json_response['message']).to eq('variables needs to be a map of key-valued strings')
         end
 
         it 'creates trigger request with variables' do
-          post api("/projects/#{project.id}/trigger/pipeline"), options.merge(variables: variables, ref: 'master')
+          post api("/projects/#{project.id}/trigger/pipeline"), params: options.merge(variables: variables, ref: 'master')
 
           expect(response).to have_gitlab_http_status(201)
           expect(pipeline.variables.map { |v| { v.key => v.value } }.last).to eq(variables)
@@ -91,7 +91,7 @@
         end
 
         it 'creates pipeline' do
-          post api("/projects/#{project.id}/trigger/pipeline"), options.merge(ref: 'master')
+          post api("/projects/#{project.id}/trigger/pipeline"), params: options.merge(ref: 'master')
 
           expect(response).to have_gitlab_http_status(201)
           expect(json_response).to include('id' => pipeline.id)
@@ -104,14 +104,14 @@
 
     context 'when triggering a pipeline from a trigger token' do
       it 'does not leak the presence of project when token is for different project' do
-        post api("/projects/#{project2.id}/ref/master/trigger/pipeline?token=#{trigger_token}"), { ref: 'refs/heads/other-branch' }
+        post api("/projects/#{project2.id}/ref/master/trigger/pipeline?token=#{trigger_token}"), params: { ref: 'refs/heads/other-branch' }
 
         expect(response).to have_gitlab_http_status(404)
       end
 
       it 'creates builds from the ref given in the URL, not in the body' do
         expect do
-          post api("/projects/#{project.id}/ref/master/trigger/pipeline?token=#{trigger_token}"), { ref: 'refs/heads/other-branch' }
+          post api("/projects/#{project.id}/ref/master/trigger/pipeline?token=#{trigger_token}"), params: { ref: 'refs/heads/other-branch' }
         end.to change(project.builds, :count).by(5)
 
         expect(response).to have_gitlab_http_status(201)
@@ -122,7 +122,7 @@
           project.repository.create_file(user, '.gitlab/gitlabhq/new_feature.md', 'something valid', message: 'new_feature', branch_name: 'v.1-branch')
 
           expect do
-            post api("/projects/#{project.id}/ref/v.1-branch/trigger/pipeline?token=#{trigger_token}"), { ref: 'refs/heads/other-branch' }
+            post api("/projects/#{project.id}/ref/v.1-branch/trigger/pipeline?token=#{trigger_token}"), params: { ref: 'refs/heads/other-branch' }
           end.to change(project.builds, :count).by(4)
 
           expect(response).to have_gitlab_http_status(201)
@@ -295,7 +295,7 @@
         it 'creates trigger' do
           expect do
             post api("/projects/#{project.id}/triggers", user),
-              description: 'trigger'
+              params: { description: 'trigger' }
           end.to change {project.triggers.count}.by(1)
 
           expect(response).to have_gitlab_http_status(201)
@@ -315,7 +315,7 @@
     context 'authenticated user with invalid permissions' do
       it 'does not create trigger' do
         post api("/projects/#{project.id}/triggers", user2),
-          description: 'trigger'
+          params: { description: 'trigger' }
 
         expect(response).to have_gitlab_http_status(403)
       end
@@ -324,7 +324,7 @@
     context 'unauthenticated user' do
       it 'does not create trigger' do
         post api("/projects/#{project.id}/triggers"),
-          description: 'trigger'
+          params: { description: 'trigger' }
 
         expect(response).to have_gitlab_http_status(401)
       end
@@ -337,7 +337,7 @@
 
       it 'updates description' do
         put api("/projects/#{project.id}/triggers/#{trigger.id}", user),
-          description: new_description
+          params: { description: new_description }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response).to include('description' => new_description)
diff --git a/spec/requests/api/users_spec.rb b/spec/requests/api/users_spec.rb
index a3f476a495fc7988cf4daa2e4c9287396cf5f4a9..9ed32080d5670b8ceb0ecf5ea8eb4178a9fac518 100644
--- a/spec/requests/api/users_spec.rb
+++ b/spec/requests/api/users_spec.rb
@@ -43,7 +43,7 @@
       end
 
       it "returns the user when a valid `username` parameter is passed" do
-        get api("/users"), username: user.username
+        get api("/users"), params: { username: user.username }
 
         expect(response).to match_response_schema('public_api/v4/user/basics')
         expect(json_response.size).to eq(1)
@@ -52,7 +52,7 @@
       end
 
       it "returns the user when a valid `username` parameter is passed (case insensitive)" do
-        get api("/users"), username: user.username.upcase
+        get api("/users"), params: { username: user.username.upcase }
 
         expect(response).to match_response_schema('public_api/v4/user/basics')
         expect(json_response.size).to eq(1)
@@ -61,7 +61,7 @@
       end
 
       it "returns an empty response when an invalid `username` parameter is passed" do
-        get api("/users"), username: 'invalid'
+        get api("/users"), params: { username: 'invalid' }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response).to be_an Array
@@ -74,7 +74,7 @@
         end
 
         it "returns authorization error when the `username` parameter refers to an inaccessible user" do
-          get api("/users"), username: user.username
+          get api("/users"), params: { username: user.username }
 
           expect(response).to have_gitlab_http_status(403)
         end
@@ -243,7 +243,7 @@
         admin
         user
 
-        get api('/users', admin), { order_by: 'id', sort: 'asc' }
+        get api('/users', admin), params: { order_by: 'id', sort: 'asc' }
 
         expect(response).to match_response_schema('public_api/v4/user/admins')
         expect(json_response.size).to eq(2)
@@ -256,7 +256,7 @@
         user
         user_with_2fa = create(:user, :two_factor_via_otp)
 
-        get api('/users', admin), { two_factor: 'enabled' }
+        get api('/users', admin), params: { two_factor: 'enabled' }
 
         expect(response).to match_response_schema('public_api/v4/user/admins')
         expect(json_response.size).to eq(1)
@@ -264,7 +264,7 @@
       end
 
       it 'returns 400 when provided incorrect sort params' do
-        get api('/users', admin), { order_by: 'magic', sort: 'asc' }
+        get api('/users', admin), params: { order_by: 'magic', sort: 'asc' }
 
         expect(response).to have_gitlab_http_status(400)
       end
@@ -273,7 +273,7 @@
     context "when authenticated and ldap is enabled" do
       it "returns non-ldap user" do
         create :omniauth_user, provider: "ldapserver1"
-        get api("/users", user), skip_ldap: "true"
+        get api("/users", user), params: { skip_ldap: "true" }
         expect(response).to have_gitlab_http_status(200)
         expect(json_response).to be_an Array
         username = user.username
@@ -386,12 +386,12 @@
 
     it "creates user" do
       expect do
-        post api("/users", admin), attributes_for(:user, projects_limit: 3)
+        post api("/users", admin), params: attributes_for(:user, projects_limit: 3)
       end.to change { User.count }.by(1)
     end
 
     it "creates user with correct attributes" do
-      post api('/users', admin), attributes_for(:user, admin: true, can_create_group: true)
+      post api('/users', admin), params: attributes_for(:user, admin: true, can_create_group: true)
       expect(response).to have_gitlab_http_status(201)
       user_id = json_response['id']
       new_user = User.find(user_id)
@@ -404,13 +404,13 @@
       optional_attributes = { confirm: true }
       attributes = attributes_for(:user).merge(optional_attributes)
 
-      post api('/users', admin), attributes
+      post api('/users', admin), params: attributes
 
       expect(response).to have_gitlab_http_status(201)
     end
 
     it "creates non-admin user" do
-      post api('/users', admin), attributes_for(:user, admin: false, can_create_group: false)
+      post api('/users', admin), params: attributes_for(:user, admin: false, can_create_group: false)
       expect(response).to have_gitlab_http_status(201)
       user_id = json_response['id']
       new_user = User.find(user_id)
@@ -420,7 +420,7 @@
     end
 
     it "creates non-admin users by default" do
-      post api('/users', admin), attributes_for(:user)
+      post api('/users', admin), params: attributes_for(:user)
       expect(response).to have_gitlab_http_status(201)
       user_id = json_response['id']
       new_user = User.find(user_id)
@@ -429,12 +429,12 @@
     end
 
     it "returns 201 Created on success" do
-      post api("/users", admin), attributes_for(:user, projects_limit: 3)
+      post api("/users", admin), params: attributes_for(:user, projects_limit: 3)
       expect(response).to have_gitlab_http_status(201)
     end
 
     it 'creates non-external users by default' do
-      post api("/users", admin), attributes_for(:user)
+      post api("/users", admin), params: attributes_for(:user)
       expect(response).to have_gitlab_http_status(201)
 
       user_id = json_response['id']
@@ -444,7 +444,7 @@
     end
 
     it 'allows an external user to be created' do
-      post api("/users", admin), attributes_for(:user, external: true)
+      post api("/users", admin), params: attributes_for(:user, external: true)
       expect(response).to have_gitlab_http_status(201)
 
       user_id = json_response['id']
@@ -454,7 +454,7 @@
     end
 
     it "creates user with reset password" do
-      post api('/users', admin), attributes_for(:user, reset_password: true).except(:password)
+      post api('/users', admin), params: attributes_for(:user, reset_password: true).except(:password)
 
       expect(response).to have_gitlab_http_status(201)
 
@@ -466,7 +466,7 @@
     end
 
     it "creates user with private profile" do
-      post api('/users', admin), attributes_for(:user, private_profile: true)
+      post api('/users', admin), params: attributes_for(:user, private_profile: true)
 
       expect(response).to have_gitlab_http_status(201)
 
@@ -479,40 +479,44 @@
 
     it "does not create user with invalid email" do
       post api('/users', admin),
-           email: 'invalid email',
-           password: 'password',
-           name: 'test'
+           params: {
+             email: 'invalid email',
+             password: 'password',
+             name: 'test'
+           }
       expect(response).to have_gitlab_http_status(400)
     end
 
     it 'returns 400 error if name not given' do
-      post api('/users', admin), attributes_for(:user).except(:name)
+      post api('/users', admin), params: attributes_for(:user).except(:name)
       expect(response).to have_gitlab_http_status(400)
     end
 
     it 'returns 400 error if password not given' do
-      post api('/users', admin), attributes_for(:user).except(:password)
+      post api('/users', admin), params: attributes_for(:user).except(:password)
       expect(response).to have_gitlab_http_status(400)
     end
 
     it 'returns 400 error if email not given' do
-      post api('/users', admin), attributes_for(:user).except(:email)
+      post api('/users', admin), params: attributes_for(:user).except(:email)
       expect(response).to have_gitlab_http_status(400)
     end
 
     it 'returns 400 error if username not given' do
-      post api('/users', admin), attributes_for(:user).except(:username)
+      post api('/users', admin), params: attributes_for(:user).except(:username)
       expect(response).to have_gitlab_http_status(400)
     end
 
     it 'returns 400 error if user does not validate' do
       post api('/users', admin),
-           password: 'pass',
-           email: 'test@example.com',
-           username: 'test!',
-           name: 'test',
-           bio: 'g' * 256,
-           projects_limit: -1
+           params: {
+             password: 'pass',
+             email: 'test@example.com',
+             username: 'test!',
+             name: 'test',
+             bio: 'g' * 256,
+             projects_limit: -1
+           }
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['message']['password'])
         .to eq(['is too short (minimum is 8 characters)'])
@@ -525,26 +529,30 @@
     end
 
     it "is not available for non admin users" do
-      post api("/users", user), attributes_for(:user)
+      post api("/users", user), params: attributes_for(:user)
       expect(response).to have_gitlab_http_status(403)
     end
 
     context 'with existing user' do
       before do
         post api('/users', admin),
-             email: 'test@example.com',
-             password: 'password',
-             username: 'test',
-             name: 'foo'
+             params: {
+               email: 'test@example.com',
+               password: 'password',
+               username: 'test',
+               name: 'foo'
+             }
       end
 
       it 'returns 409 conflict error if user with same email exists' do
         expect do
           post api('/users', admin),
-               name: 'foo',
-               email: 'test@example.com',
-               password: 'password',
-               username: 'foo'
+               params: {
+                 name: 'foo',
+                 email: 'test@example.com',
+                 password: 'password',
+                 username: 'foo'
+               }
         end.to change { User.count }.by(0)
         expect(response).to have_gitlab_http_status(409)
         expect(json_response['message']).to eq('Email has already been taken')
@@ -553,10 +561,12 @@
       it 'returns 409 conflict error if same username exists' do
         expect do
           post api('/users', admin),
-               name: 'foo',
-               email: 'foo@example.com',
-               password: 'password',
-               username: 'test'
+               params: {
+                 name: 'foo',
+                 email: 'foo@example.com',
+                 password: 'password',
+                 username: 'test'
+               }
         end.to change { User.count }.by(0)
         expect(response).to have_gitlab_http_status(409)
         expect(json_response['message']).to eq('Username has already been taken')
@@ -565,17 +575,19 @@
       it 'returns 409 conflict error if same username exists (case insensitive)' do
         expect do
           post api('/users', admin),
-               name: 'foo',
-               email: 'foo@example.com',
-               password: 'password',
-               username: 'TEST'
+               params: {
+                 name: 'foo',
+                 email: 'foo@example.com',
+                 password: 'password',
+                 username: 'TEST'
+               }
         end.to change { User.count }.by(0)
         expect(response).to have_gitlab_http_status(409)
         expect(json_response['message']).to eq('Username has already been taken')
       end
 
       it 'creates user with new identity' do
-        post api("/users", admin), attributes_for(:user, provider: 'github', extern_uid: '67890')
+        post api("/users", admin), params: attributes_for(:user, provider: 'github', extern_uid: '67890')
 
         expect(response).to have_gitlab_http_status(201)
         expect(json_response['identities'].first['extern_uid']).to eq('67890')
@@ -604,7 +616,7 @@
     let!(:admin_user) { create(:admin) }
 
     it "updates user with new bio" do
-      put api("/users/#{user.id}", admin), { bio: 'new test bio' }
+      put api("/users/#{user.id}", admin), params: { bio: 'new test bio' }
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['bio']).to eq('new test bio')
@@ -614,7 +626,7 @@
     it "updates user with new password and forces reset on next login" do
       stub_licensed_features(extended_audit_events: true)
 
-      put api("/users/#{user.id}", admin), password: '12345678'
+      put api("/users/#{user.id}", admin), params: { password: '12345678' }
 
       expect(response).to have_gitlab_http_status(200)
       expect(user.reload.password_expires_at).to be <= Time.now
@@ -622,7 +634,7 @@
     end
 
     it "updates user with organization" do
-      put api("/users/#{user.id}", admin), { organization: 'GitLab' }
+      put api("/users/#{user.id}", admin), params: { organization: 'GitLab' }
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['organization']).to eq('GitLab')
@@ -630,7 +642,7 @@
     end
 
     it 'updates user with avatar' do
-      put api("/users/#{user.id}", admin), { avatar: fixture_file_upload('spec/fixtures/banana_sample.gif', 'image/gif') }
+      put api("/users/#{user.id}", admin), params: { avatar: fixture_file_upload('spec/fixtures/banana_sample.gif', 'image/gif') }
 
       user.reload
 
@@ -642,7 +654,7 @@
     it 'updates user with a new email' do
       old_email = user.email
       old_notification_email = user.notification_email
-      put api("/users/#{user.id}", admin), email: 'new@email.com'
+      put api("/users/#{user.id}", admin), params: { email: 'new@email.com' }
 
       user.reload
 
@@ -654,7 +666,7 @@
     end
 
     it 'skips reconfirmation when requested' do
-      put api("/users/#{user.id}", admin), email: 'new@email.com', skip_reconfirmation: true
+      put api("/users/#{user.id}", admin), params: { email: 'new@email.com', skip_reconfirmation: true }
 
       user.reload
 
@@ -664,7 +676,7 @@
     end
 
     it 'updates user with his own username' do
-      put api("/users/#{user.id}", admin), username: user.username
+      put api("/users/#{user.id}", admin), params: { username: user.username }
 
       expect(response).to have_gitlab_http_status(200)
       expect(json_response['username']).to eq(user.username)
@@ -672,14 +684,14 @@
     end
 
     it "updates user's existing identity" do
-      put api("/users/#{omniauth_user.id}", admin), provider: 'ldapmain', extern_uid: '654321'
+      put api("/users/#{omniauth_user.id}", admin), params: { provider: 'ldapmain', extern_uid: '654321' }
 
       expect(response).to have_gitlab_http_status(200)
       expect(omniauth_user.reload.identities.first.extern_uid).to eq('654321')
     end
 
     it 'updates user with new identity' do
-      put api("/users/#{user.id}", admin), provider: 'github', extern_uid: 'john'
+      put api("/users/#{user.id}", admin), params: { provider: 'github', extern_uid: 'john' }
 
       expect(response).to have_gitlab_http_status(200)
       expect(user.reload.identities.first.extern_uid).to eq('john')
@@ -687,14 +699,14 @@
     end
 
     it "updates admin status" do
-      put api("/users/#{user.id}", admin), { admin: true }
+      put api("/users/#{user.id}", admin), params: { admin: true }
 
       expect(response).to have_gitlab_http_status(200)
       expect(user.reload.admin).to eq(true)
     end
 
     it "updates external status" do
-      put api("/users/#{user.id}", admin), { external: true }
+      put api("/users/#{user.id}", admin), params: { external: true }
 
       expect(response.status).to eq 200
       expect(json_response['external']).to eq(true)
@@ -702,7 +714,7 @@
     end
 
     it "updates private profile" do
-      put api("/users/#{user.id}", admin), { private_profile: true }
+      put api("/users/#{user.id}", admin), params: { private_profile: true }
 
       expect(response).to have_gitlab_http_status(200)
       expect(user.reload.private_profile).to eq(true)
@@ -711,7 +723,7 @@
     # EE
     it "updates shared_runners_minutes_limit" do
       expect do
-        put api("/users/#{user.id}", admin), { shared_runners_minutes_limit: 133 }
+        put api("/users/#{user.id}", admin), params: { shared_runners_minutes_limit: 133 }
       end.to change { user.reload.shared_runners_minutes_limit }
         .from(nil).to(133)
 
@@ -720,7 +732,7 @@
     end
 
     it "does not update admin status" do
-      put api("/users/#{admin_user.id}", admin), { can_create_group: false }
+      put api("/users/#{admin_user.id}", admin), params: { can_create_group: false }
 
       expect(response).to have_gitlab_http_status(200)
       expect(admin_user.reload.admin).to eq(true)
@@ -728,7 +740,7 @@
     end
 
     it "does not allow invalid update" do
-      put api("/users/#{user.id}", admin), { email: 'invalid email' }
+      put api("/users/#{user.id}", admin), params: { email: 'invalid email' }
 
       expect(response).to have_gitlab_http_status(400)
       expect(user.reload.email).not_to eq('invalid email')
@@ -737,7 +749,7 @@
     context 'when the current user is not an admin' do
       it "is not available" do
         expect do
-          put api("/users/#{user.id}", user), attributes_for(:user)
+          put api("/users/#{user.id}", user), params: attributes_for(:user)
         end.not_to change { user.reload.attributes }
 
         expect(response).to have_gitlab_http_status(403)
@@ -745,7 +757,7 @@
 
       it "cannot update their own shared_runners_minutes_limit" do
         expect do
-          put api("/users/#{user.id}", user), { shared_runners_minutes_limit: 133 }
+          put api("/users/#{user.id}", user), params: { shared_runners_minutes_limit: 133 }
         end.not_to change { user.reload.shared_runners_minutes_limit }
 
         expect(response).to have_gitlab_http_status(403)
@@ -753,7 +765,7 @@
     end
 
     it "returns 404 for non-existing user" do
-      put api("/users/999999", admin), { bio: 'update should fail' }
+      put api("/users/999999", admin), params: { bio: 'update should fail' }
 
       expect(response).to have_gitlab_http_status(404)
       expect(json_response['message']).to eq('404 User Not Found')
@@ -767,12 +779,14 @@
 
     it 'returns 400 error if user does not validate' do
       put api("/users/#{user.id}", admin),
-          password: 'pass',
-          email: 'test@example.com',
-          username: 'test!',
-          name: 'test',
-          bio: 'g' * 256,
-          projects_limit: -1
+          params: {
+            password: 'pass',
+            email: 'test@example.com',
+            username: 'test!',
+            name: 'test',
+            bio: 'g' * 256,
+            projects_limit: -1
+          }
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['message']['password'])
         .to eq(['is too short (minimum is 8 characters)'])
@@ -785,26 +799,26 @@
     end
 
     it 'returns 400 if provider is missing for identity update' do
-      put api("/users/#{omniauth_user.id}", admin), extern_uid: '654321'
+      put api("/users/#{omniauth_user.id}", admin), params: { extern_uid: '654321' }
 
       expect(response).to have_gitlab_http_status(400)
     end
 
     it 'returns 400 if external UID is missing for identity update' do
-      put api("/users/#{omniauth_user.id}", admin), provider: 'ldap'
+      put api("/users/#{omniauth_user.id}", admin), params: { provider: 'ldap' }
 
       expect(response).to have_gitlab_http_status(400)
     end
 
     context "with existing user" do
       before do
-        post api("/users", admin), { email: 'test@example.com', password: 'password', username: 'test', name: 'test' }
-        post api("/users", admin), { email: 'foo@bar.com', password: 'password', username: 'john', name: 'john' }
+        post api("/users", admin), params: { email: 'test@example.com', password: 'password', username: 'test', name: 'test' }
+        post api("/users", admin), params: { email: 'foo@bar.com', password: 'password', username: 'john', name: 'john' }
         @user = User.all.last
       end
 
       it 'returns 409 conflict error if email address exists' do
-        put api("/users/#{@user.id}", admin), email: 'test@example.com'
+        put api("/users/#{@user.id}", admin), params: { email: 'test@example.com' }
 
         expect(response).to have_gitlab_http_status(409)
         expect(@user.reload.email).to eq(@user.email)
@@ -812,7 +826,7 @@
 
       it 'returns 409 conflict error if username taken' do
         @user_id = User.all.last.id
-        put api("/users/#{@user.id}", admin), username: 'test'
+        put api("/users/#{@user.id}", admin), params: { username: 'test' }
 
         expect(response).to have_gitlab_http_status(409)
         expect(@user.reload.username).to eq(@user.username)
@@ -820,7 +834,7 @@
 
       it 'returns 409 conflict error if username taken (case insensitive)' do
         @user_id = User.all.last.id
-        put api("/users/#{@user.id}", admin), username: 'TEST'
+        put api("/users/#{@user.id}", admin), params: { username: 'TEST' }
 
         expect(response).to have_gitlab_http_status(409)
         expect(@user.reload.username).to eq(@user.username)
@@ -834,14 +848,14 @@
     end
 
     it "does not create invalid ssh key" do
-      post api("/users/#{user.id}/keys", admin), { title: "invalid key" }
+      post api("/users/#{user.id}/keys", admin), params: { title: "invalid key" }
 
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['error']).to eq('key is missing')
     end
 
     it 'does not create key without title' do
-      post api("/users/#{user.id}/keys", admin), key: 'some key'
+      post api("/users/#{user.id}/keys", admin), params: { key: 'some key' }
 
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['error']).to eq('title is missing')
@@ -850,7 +864,7 @@
     it "creates ssh key" do
       key_attrs = attributes_for :key
       expect do
-        post api("/users/#{user.id}/keys", admin), key_attrs
+        post api("/users/#{user.id}/keys", admin), params: key_attrs
       end.to change { user.keys.count }.by(1)
     end
 
@@ -942,7 +956,7 @@
     it 'creates GPG key' do
       key_attrs = attributes_for :gpg_key
       expect do
-        post api("/users/#{user.id}/gpg_keys", admin), key_attrs
+        post api("/users/#{user.id}/gpg_keys", admin), params: key_attrs
 
         expect(response).to have_gitlab_http_status(201)
       end.to change { user.gpg_keys.count }.by(1)
@@ -1091,7 +1105,7 @@
     end
 
     it "does not create invalid email" do
-      post api("/users/#{user.id}/emails", admin), {}
+      post api("/users/#{user.id}/emails", admin), params: {}
 
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['error']).to eq('email is missing')
@@ -1100,7 +1114,7 @@
     it "creates unverified email" do
       email_attrs = attributes_for :email
       expect do
-        post api("/users/#{user.id}/emails", admin), email_attrs
+        post api("/users/#{user.id}/emails", admin), params: email_attrs
       end.to change { user.emails.count }.by(1)
 
       email = Email.find_by(user_id: user.id, email: email_attrs[:email])
@@ -1117,7 +1131,7 @@
       email_attrs = attributes_for :email
       email_attrs[:skip_confirmation] = true
 
-      post api("/users/#{user.id}/emails", admin), email_attrs
+      post api("/users/#{user.id}/emails", admin), params: email_attrs
 
       expect(response).to have_gitlab_http_status(201)
 
@@ -1412,32 +1426,32 @@
     it "creates ssh key" do
       key_attrs = attributes_for :key
       expect do
-        post api("/user/keys", user), key_attrs
+        post api("/user/keys", user), params: key_attrs
       end.to change { user.keys.count }.by(1)
       expect(response).to have_gitlab_http_status(201)
     end
 
     it "returns a 401 error if unauthorized" do
-      post api("/user/keys"), title: 'some title', key: 'some key'
+      post api("/user/keys"), params: { title: 'some title', key: 'some key' }
       expect(response).to have_gitlab_http_status(401)
     end
 
     it "does not create ssh key without key" do
-      post api("/user/keys", user), title: 'title'
+      post api("/user/keys", user), params: { title: 'title' }
 
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['error']).to eq('key is missing')
     end
 
     it 'does not create ssh key without title' do
-      post api('/user/keys', user), key: 'some key'
+      post api('/user/keys', user), params: { key: 'some key' }
 
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['error']).to eq('title is missing')
     end
 
     it "does not create ssh key without title" do
-      post api("/user/keys", user), key: "somekey"
+      post api("/user/keys", user), params: { key: "somekey" }
       expect(response).to have_gitlab_http_status(400)
     end
   end
@@ -1556,14 +1570,14 @@
     it 'creates a GPG key' do
       key_attrs = attributes_for :gpg_key
       expect do
-        post api('/user/gpg_keys', user), key_attrs
+        post api('/user/gpg_keys', user), params: key_attrs
 
         expect(response).to have_gitlab_http_status(201)
       end.to change { user.gpg_keys.count }.by(1)
     end
 
     it 'returns a 401 error if unauthorized' do
-      post api('/user/gpg_keys'), key: 'some key'
+      post api('/user/gpg_keys'), params: { key: 'some key' }
 
       expect(response).to have_gitlab_http_status(401)
     end
@@ -1718,18 +1732,18 @@
     it "creates email" do
       email_attrs = attributes_for :email
       expect do
-        post api("/user/emails", user), email_attrs
+        post api("/user/emails", user), params: email_attrs
       end.to change { user.emails.count }.by(1)
       expect(response).to have_gitlab_http_status(201)
     end
 
     it "returns a 401 error if unauthorized" do
-      post api("/user/emails"), email: 'some email'
+      post api("/user/emails"), params: { email: 'some email' }
       expect(response).to have_gitlab_http_status(401)
     end
 
     it "does not create email with invalid email" do
-      post api("/user/emails", user), {}
+      post api("/user/emails", user), params: {}
 
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['error']).to eq('email is missing')
@@ -1897,14 +1911,14 @@
 
   describe 'PUT /user/status' do
     it 'saves the status' do
-      put api('/user/status', user), { emoji: 'smirk', message: 'hello world' }
+      put api('/user/status', user), params: { emoji: 'smirk', message: 'hello world' }
 
       expect(response).to have_gitlab_http_status(:success)
       expect(json_response['emoji']).to eq('smirk')
     end
 
     it 'renders errors when the status was invalid' do
-      put api('/user/status', user), { emoji: 'does not exist', message: 'hello world' }
+      put api('/user/status', user), params: { emoji: 'does not exist', message: 'hello world' }
 
       expect(response).to have_gitlab_http_status(400)
       expect(json_response['message']['emoji']).to be_present
@@ -1983,8 +1997,10 @@
 
     it 'returns a 404 error if user not found' do
       post api("/users/#{not_existing_user_id}/impersonation_tokens", admin),
-        name: name,
-        expires_at: expires_at
+        params: {
+          name: name,
+          expires_at: expires_at
+        }
 
       expect(response).to have_gitlab_http_status(404)
       expect(json_response['message']).to eq('404 User Not Found')
@@ -1992,8 +2008,10 @@
 
     it 'returns a 403 error when authenticated as normal user' do
       post api("/users/#{user.id}/impersonation_tokens", user),
-        name: name,
-        expires_at: expires_at
+        params: {
+          name: name,
+          expires_at: expires_at
+        }
 
       expect(response).to have_gitlab_http_status(403)
       expect(json_response['message']).to eq('403 Forbidden')
@@ -2001,10 +2019,12 @@
 
     it 'creates a impersonation token' do
       post api("/users/#{user.id}/impersonation_tokens", admin),
-        name: name,
-        expires_at: expires_at,
-        scopes: scopes,
-        impersonation: impersonation
+        params: {
+          name: name,
+          expires_at: expires_at,
+          scopes: scopes,
+          impersonation: impersonation
+        }
 
       expect(response).to have_gitlab_http_status(201)
       expect(json_response['name']).to eq(name)
diff --git a/spec/requests/api/variables_spec.rb b/spec/requests/api/variables_spec.rb
index be333df1d78b7adc2d7b93cc287ac8d57adb3ef6..cdac5b2f4005c6a1cecd9ab65cf38d5f6aac48cc 100644
--- a/spec/requests/api/variables_spec.rb
+++ b/spec/requests/api/variables_spec.rb
@@ -73,7 +73,7 @@
     context 'authorized user with proper permissions' do
       it 'creates variable' do
         expect do
-          post api("/projects/#{project.id}/variables", user), key: 'TEST_VARIABLE_2', value: 'VALUE_2', protected: true
+          post api("/projects/#{project.id}/variables", user), params: { key: 'TEST_VARIABLE_2', value: 'VALUE_2', protected: true }
         end.to change {project.variables.count}.by(1)
 
         expect(response).to have_gitlab_http_status(201)
@@ -84,7 +84,7 @@
 
       it 'creates variable with optional attributes' do
         expect do
-          post api("/projects/#{project.id}/variables", user), key: 'TEST_VARIABLE_2', value: 'VALUE_2'
+          post api("/projects/#{project.id}/variables", user), params: { key: 'TEST_VARIABLE_2', value: 'VALUE_2' }
         end.to change {project.variables.count}.by(1)
 
         expect(response).to have_gitlab_http_status(201)
@@ -95,7 +95,7 @@
 
       it 'does not allow to duplicate variable key' do
         expect do
-          post api("/projects/#{project.id}/variables", user), key: variable.key, value: 'VALUE_2'
+          post api("/projects/#{project.id}/variables", user), params: { key: variable.key, value: 'VALUE_2' }
         end.to change {project.variables.count}.by(0)
 
         expect(response).to have_gitlab_http_status(400)
@@ -125,7 +125,7 @@
         initial_variable = project.variables.reload.first
         value_before = initial_variable.value
 
-        put api("/projects/#{project.id}/variables/#{variable.key}", user), value: 'VALUE_1_UP', protected: true
+        put api("/projects/#{project.id}/variables/#{variable.key}", user), params: { value: 'VALUE_1_UP', protected: true }
 
         updated_variable = project.variables.reload.first
 
diff --git a/spec/requests/api/wikis_spec.rb b/spec/requests/api/wikis_spec.rb
index 08bada4417888b34682a7418d0995a3e508b0a6a..f5092e8e2b5475ed28e6403e1990fd17a9b11bb4 100644
--- a/spec/requests/api/wikis_spec.rb
+++ b/spec/requests/api/wikis_spec.rb
@@ -39,7 +39,7 @@
       end
 
       it 'returns the list of wiki pages with content' do
-        get api(url, user), with_content: 1
+        get api(url, user), params: { with_content: 1 }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response.size).to eq(2)
@@ -74,7 +74,7 @@
 
   shared_examples_for 'creates wiki page' do
     it 'creates the wiki page' do
-      post(api(url, user), payload)
+      post(api(url, user), params: payload)
 
       expect(response).to have_gitlab_http_status(201)
       expect(json_response.size).to eq(4)
@@ -89,7 +89,7 @@
       it "responds with validation error on empty #{part}" do
         payload.delete(part)
 
-        post(api(url, user), payload)
+        post(api(url, user), params: payload)
 
         expect(response).to have_gitlab_http_status(400)
         expect(json_response.size).to eq(1)
@@ -143,7 +143,7 @@
     it 'pushes attachment to the wiki repository' do
       allow(SecureRandom).to receive(:hex).and_return('fixed_hex')
 
-      post(api(url, user), payload)
+      post(api(url, user), params: payload)
 
       expect(response).to have_gitlab_http_status(201)
       expect(json_response).to eq result_hash.deep_stringify_keys
@@ -152,7 +152,7 @@
     it 'responds with validation error on empty file' do
       payload.delete(:file)
 
-      post(api(url, user), payload)
+      post(api(url, user), params: payload)
 
       expect(response).to have_gitlab_http_status(400)
       expect(json_response.size).to eq(1)
@@ -162,7 +162,7 @@
     it 'responds with validation error on invalid temp file' do
       payload[:file] = { tempfile: '/etc/hosts' }
 
-      post(api(url, user), payload)
+      post(api(url, user), params: payload)
 
       expect(response).to have_gitlab_http_status(400)
       expect(json_response.size).to eq(1)
@@ -395,7 +395,7 @@
 
       context 'when user is guest' do
         before do
-          post(api(url), payload)
+          post(api(url), params: payload)
         end
 
         include_examples '404 Project Not Found'
@@ -404,7 +404,7 @@
       context 'when user is developer' do
         before do
           project.add_developer(user)
-          post(api(url, user), payload)
+          post(api(url, user), params: payload)
         end
 
         include_examples '403 Forbidden'
@@ -413,7 +413,7 @@
       context 'when user is maintainer' do
         before do
           project.add_maintainer(user)
-          post(api(url, user), payload)
+          post(api(url, user), params: payload)
         end
 
         include_examples '403 Forbidden'
@@ -425,7 +425,7 @@
 
       context 'when user is guest' do
         before do
-          post(api(url), payload)
+          post(api(url), params: payload)
         end
 
         include_examples '404 Project Not Found'
@@ -453,7 +453,7 @@
 
       context 'when user is guest' do
         before do
-          post(api(url), payload)
+          post(api(url), params: payload)
         end
 
         include_examples '404 Project Not Found'
@@ -487,7 +487,7 @@
 
       context 'when user is guest' do
         before do
-          put(api(url), payload)
+          put(api(url), params: payload)
         end
 
         include_examples '404 Project Not Found'
@@ -497,7 +497,7 @@
         before do
           project.add_developer(user)
 
-          put(api(url, user), payload)
+          put(api(url, user), params: payload)
         end
 
         include_examples '403 Forbidden'
@@ -507,7 +507,7 @@
         before do
           project.add_maintainer(user)
 
-          put(api(url, user), payload)
+          put(api(url, user), params: payload)
         end
 
         include_examples '403 Forbidden'
@@ -519,7 +519,7 @@
 
       context 'when user is guest' do
         before do
-          put(api(url), payload)
+          put(api(url), params: payload)
         end
 
         include_examples '404 Project Not Found'
@@ -529,7 +529,7 @@
         before do
           project.add_developer(user)
 
-          put(api(url, user), payload)
+          put(api(url, user), params: payload)
         end
 
         include_examples 'updates wiki page'
@@ -545,7 +545,7 @@
         before do
           project.add_maintainer(user)
 
-          put(api(url, user), payload)
+          put(api(url, user), params: payload)
         end
 
         include_examples 'updates wiki page'
@@ -563,7 +563,7 @@
 
       context 'when user is guest' do
         before do
-          put(api(url), payload)
+          put(api(url), params: payload)
         end
 
         include_examples '404 Project Not Found'
@@ -573,7 +573,7 @@
         before do
           project.add_developer(user)
 
-          put(api(url, user), payload)
+          put(api(url, user), params: payload)
         end
 
         include_examples 'updates wiki page'
@@ -589,7 +589,7 @@
         before do
           project.add_maintainer(user)
 
-          put(api(url, user), payload)
+          put(api(url, user), params: payload)
         end
 
         include_examples 'updates wiki page'
@@ -606,7 +606,7 @@
       let(:project) { create(:project, :wiki_repo, namespace: group) }
 
       before do
-        put(api(url, user), payload)
+        put(api(url, user), params: payload)
       end
 
       include_examples 'updates wiki page'
@@ -751,7 +751,7 @@
 
       context 'when user is guest' do
         before do
-          post(api(url), payload)
+          post(api(url), params: payload)
         end
 
         include_examples '404 Project Not Found'
@@ -760,7 +760,7 @@
       context 'when user is developer' do
         before do
           project.add_developer(user)
-          post(api(url, user), payload)
+          post(api(url, user), params: payload)
         end
 
         include_examples '403 Forbidden'
@@ -769,7 +769,7 @@
       context 'when user is maintainer' do
         before do
           project.add_maintainer(user)
-          post(api(url, user), payload)
+          post(api(url, user), params: payload)
         end
 
         include_examples '403 Forbidden'
@@ -781,7 +781,7 @@
 
       context 'when user is guest' do
         before do
-          post(api(url), payload)
+          post(api(url), params: payload)
         end
 
         include_examples '404 Project Not Found'
@@ -809,7 +809,7 @@
 
       context 'when user is guest' do
         before do
-          post(api(url), payload)
+          post(api(url), params: payload)
         end
 
         include_examples '404 Project Not Found'
diff --git a/spec/requests/git_http_spec.rb b/spec/requests/git_http_spec.rb
index 8302e2820224db442110d61ca36df292c45846c1..eca522559bcbe2dfe22ea41bf2050bb7c997d666 100644
--- a/spec/requests/git_http_spec.rb
+++ b/spec/requests/git_http_spec.rb
@@ -835,7 +835,7 @@ def attempt_login(include_password)
             let(:params) { { service: 'git-upload-pack' } }
 
             before do
-              get path, params
+              get path, params: params
             end
 
             it "redirects to the .git suffix version" do
@@ -847,7 +847,7 @@ def attempt_login(include_password)
             let(:params) { { service: 'git-receive-pack' } }
 
             before do
-              get path, params
+              get path, params: params
             end
 
             it "redirects to the .git suffix version" do
@@ -859,7 +859,7 @@ def attempt_login(include_password)
             let(:params) { { service: 'git-implode-pack' } }
 
             before do
-              get path, params
+              get path, params: params
             end
 
             it "redirects to the sign-in page" do
diff --git a/spec/requests/jwt_controller_spec.rb b/spec/requests/jwt_controller_spec.rb
index 2d87d236d61e11ed2c1b604c6fa7c56fc1bf22be..4bb3b848e17c0488b2c98e7bac46347657e307a3 100644
--- a/spec/requests/jwt_controller_spec.rb
+++ b/spec/requests/jwt_controller_spec.rb
@@ -11,7 +11,7 @@
   end
 
   context 'existing service' do
-    subject! { get '/jwt/auth', parameters }
+    subject! { get '/jwt/auth', params: parameters }
 
     it { expect(response).to have_gitlab_http_status(200) }
 
@@ -29,7 +29,7 @@
       let(:headers) { { authorization: credentials('gitlab-ci-token', build.token) } }
 
       context 'project with enabled CI' do
-        subject! { get '/jwt/auth', parameters, headers }
+        subject! { get '/jwt/auth', params: parameters, headers: headers }
 
         it { expect(service_class).to have_received(:new).with(project, nil, ActionController::Parameters.new(parameters).permit!) }
       end
@@ -39,7 +39,7 @@
           project.project_feature.update_attribute(:builds_access_level, ProjectFeature::DISABLED)
         end
 
-        subject! { get '/jwt/auth', parameters, headers }
+        subject! { get '/jwt/auth', params: parameters, headers: headers }
 
         it { expect(response).to have_gitlab_http_status(401) }
       end
@@ -53,7 +53,7 @@
           stub_container_registry_config(enabled: true)
         end
 
-        subject! { get '/jwt/auth', parameters, headers }
+        subject! { get '/jwt/auth', params: parameters, headers: headers }
 
         it 'authenticates correctly' do
           expect(response).to have_gitlab_http_status(200)
@@ -66,7 +66,7 @@
       let(:user) { create(:user) }
       let(:headers) { { authorization: credentials(user.username, user.password) } }
 
-      subject! { get '/jwt/auth', parameters, headers }
+      subject! { get '/jwt/auth', params: parameters, headers: headers }
 
       it { expect(service_class).to have_received(:new).with(nil, user, ActionController::Parameters.new(parameters).permit!) }
 
@@ -115,7 +115,7 @@
 
       context 'when internal auth is enabled' do
         it 'rejects the authorization attempt' do
-          get '/jwt/auth', parameters, headers
+          get '/jwt/auth', params: parameters, headers: headers
 
           expect(response).to have_gitlab_http_status(401)
           expect(response.body).not_to include('You must use a personal access token with \'api\' scope for Git over HTTP')
@@ -125,7 +125,7 @@
       context 'when internal auth is disabled' do
         it 'rejects the authorization attempt with personal access token message' do
           allow_any_instance_of(ApplicationSetting).to receive(:password_authentication_enabled_for_git?) { false }
-          get '/jwt/auth', parameters, headers
+          get '/jwt/auth', params: parameters, headers: headers
 
           expect(response).to have_gitlab_http_status(401)
           expect(response.body).to include('You must use a personal access token with \'api\' scope for Git over HTTP')
@@ -136,7 +136,7 @@
 
   context 'when using unauthenticated request' do
     it 'accepts the authorization attempt' do
-      get '/jwt/auth', parameters
+      get '/jwt/auth', params: parameters
 
       expect(response).to have_gitlab_http_status(200)
     end
@@ -144,12 +144,12 @@
     it 'allows read access' do
       expect(service).to receive(:execute).with(authentication_abilities: Gitlab::Auth.read_authentication_abilities)
 
-      get '/jwt/auth', parameters
+      get '/jwt/auth', params: parameters
     end
   end
 
   context 'unknown service' do
-    subject! { get '/jwt/auth', service: 'unknown' }
+    subject! { get '/jwt/auth', params: { service: 'unknown' } }
 
     it { expect(response).to have_gitlab_http_status(404) }
   end
diff --git a/spec/requests/lfs_http_spec.rb b/spec/requests/lfs_http_spec.rb
index d0b79175a06ea91616df941b005a7e7621e3c9ea..6d138fa47143fdc4d326e4af3989be3d8b5b40ec 100644
--- a/spec/requests/lfs_http_spec.rb
+++ b/spec/requests/lfs_http_spec.rb
@@ -79,7 +79,7 @@
         end
 
         it 'responds with a 501 message on download' do
-          get "#{project.http_url_to_repo}/gitlab-lfs/objects/#{sample_oid}", nil, headers
+          get "#{project.http_url_to_repo}/gitlab-lfs/objects/#{sample_oid}", params: {}, headers: headers
 
           expect(response).to have_gitlab_http_status(501)
         end
@@ -97,7 +97,7 @@
         end
 
         it 'responds with a 501 message on download' do
-          get "#{project.http_url_to_repo}/gitlab-lfs/objects/#{sample_oid}", nil, headers
+          get "#{project.http_url_to_repo}/gitlab-lfs/objects/#{sample_oid}", params: {}, headers: headers
 
           expect(response).to have_gitlab_http_status(501)
         end
@@ -123,7 +123,7 @@
         end
 
         it 'responds with a 403 message on download' do
-          get "#{project.http_url_to_repo}/gitlab-lfs/objects/#{sample_oid}", nil, headers
+          get "#{project.http_url_to_repo}/gitlab-lfs/objects/#{sample_oid}", params: {}, headers: headers
 
           expect(response).to have_gitlab_http_status(403)
           expect(json_response).to include('message' => 'Access forbidden. Check your access level.')
@@ -143,7 +143,7 @@
         end
 
         it 'responds with a 200 message on download' do
-          get "#{project.http_url_to_repo}/gitlab-lfs/objects/#{sample_oid}", nil, headers
+          get "#{project.http_url_to_repo}/gitlab-lfs/objects/#{sample_oid}", params: {}, headers: headers
 
           expect(response).to have_gitlab_http_status(200)
         end
@@ -172,7 +172,7 @@
       let(:authorization) { authorize_user }
 
       before do
-        get "#{project.http_url_to_repo}/info/lfs/objects/#{sample_oid}", nil, headers
+        get "#{project.http_url_to_repo}/info/lfs/objects/#{sample_oid}", params: {}, headers: headers
       end
 
       it_behaves_like 'a deprecated'
@@ -197,7 +197,7 @@
       enable_lfs
       update_permissions
       before_get
-      get "#{project.http_url_to_repo}/gitlab-lfs/objects/#{sample_oid}", nil, headers
+      get "#{project.http_url_to_repo}/gitlab-lfs/objects/#{sample_oid}", params: {}, headers: headers
     end
 
     context 'and request comes from gitlab-workhorse' do
@@ -1389,8 +1389,9 @@
 
         context 'when pushing the same lfs object to the second project' do
           before do
-            put "#{second_project.http_url_to_repo}/gitlab-lfs/objects/#{sample_oid}/#{sample_size}", nil,
-                headers.merge('X-Gitlab-Lfs-Tmp' => lfs_tmp_file).compact
+            put "#{second_project.http_url_to_repo}/gitlab-lfs/objects/#{sample_oid}/#{sample_size}",
+                params: {},
+                headers: headers.merge('X-Gitlab-Lfs-Tmp' => lfs_tmp_file).compact
           end
 
           it 'responds with status 200' do
@@ -1408,7 +1409,7 @@ def put_authorize(verified: true)
       authorize_headers = headers
       authorize_headers.merge!(workhorse_internal_api_request_header) if verified
 
-      put "#{project.http_url_to_repo}/gitlab-lfs/objects/#{sample_oid}/#{sample_size}/authorize", nil, authorize_headers
+      put "#{project.http_url_to_repo}/gitlab-lfs/objects/#{sample_oid}/#{sample_size}/authorize", params: {}, headers: authorize_headers
     end
 
     def put_finalize(lfs_tmp = lfs_tmp_file, with_tempfile: false, args: {})
@@ -1429,7 +1430,7 @@ def put_finalize(lfs_tmp = lfs_tmp_file, with_tempfile: false, args: {})
     end
 
     def put_finalize_with_args(args)
-      put "#{project.http_url_to_repo}/gitlab-lfs/objects/#{sample_oid}/#{sample_size}", args, headers
+      put "#{project.http_url_to_repo}/gitlab-lfs/objects/#{sample_oid}/#{sample_size}", params: args, headers: headers
     end
 
     def lfs_tmp_file
@@ -1462,7 +1463,10 @@ def authorize_deploy_token
   end
 
   def post_lfs_json(url, body = nil, headers = nil)
-    post(url, body.try(:to_json), (headers || {}).merge('Content-Type' => LfsRequest::CONTENT_TYPE))
+    params = body.try(:to_json)
+    headers = (headers || {}).merge('Content-Type' => LfsRequest::CONTENT_TYPE)
+
+    post(url, params: params, headers: headers)
   end
 
   def json_response
diff --git a/spec/requests/lfs_locks_api_spec.rb b/spec/requests/lfs_locks_api_spec.rb
index a44b43a591f512bc1e7d1382db5cd673b4a74d83..28cb90e450e27b9d424b6144a3d88cdc71832e4a 100644
--- a/spec/requests/lfs_locks_api_spec.rb
+++ b/spec/requests/lfs_locks_api_spec.rb
@@ -146,11 +146,11 @@ def authorize_user(user)
   end
 
   def post_lfs_json(url, body = nil, headers = nil)
-    post(url, body.try(:to_json), (headers || {}).merge('Content-Type' => LfsRequest::CONTENT_TYPE))
+    post(url, params: body.try(:to_json), headers: (headers || {}).merge('Content-Type' => LfsRequest::CONTENT_TYPE))
   end
 
   def do_get(url, params = nil,  headers = nil)
-    get(url, (params || {}), (headers || {}).merge('Content-Type' => LfsRequest::CONTENT_TYPE))
+    get(url, params: (params || {}), headers: (headers || {}).merge('Content-Type' => LfsRequest::CONTENT_TYPE))
   end
 
   def json_response
diff --git a/spec/requests/oauth_tokens_spec.rb b/spec/requests/oauth_tokens_spec.rb
index 000c3a2b86877a353e0b5fefc4f7220a55f6fd83..3873e754060d13a941580912755c417127cd8c36 100644
--- a/spec/requests/oauth_tokens_spec.rb
+++ b/spec/requests/oauth_tokens_spec.rb
@@ -6,11 +6,13 @@
 
   def request_access_token(user)
     post '/oauth/token',
-      grant_type: 'authorization_code',
-      code: generate_access_grant(user).token,
-      redirect_uri: application.redirect_uri,
-      client_id: application.uid,
-      client_secret: application.secret
+      params: {
+        grant_type: 'authorization_code',
+        code: generate_access_grant(user).token,
+        redirect_uri: application.redirect_uri,
+        client_id: application.uid,
+        client_secret: application.secret
+      }
   end
 
   def generate_access_grant(user)
diff --git a/spec/requests/openid_connect_spec.rb b/spec/requests/openid_connect_spec.rb
index b1cf7a531f4d8aff08b2e26b44d5fce02b8b3f67..ec546db335a40121f4c7db58ac00d07b98c24f08 100644
--- a/spec/requests/openid_connect_spec.rb
+++ b/spec/requests/openid_connect_spec.rb
@@ -47,15 +47,17 @@ def request_access_token!
     login_as user
 
     post '/oauth/token',
-      grant_type: 'authorization_code',
-      code: access_grant.token,
-      redirect_uri: application.redirect_uri,
-      client_id: application.uid,
-      client_secret: application.secret
+      params: {
+        grant_type: 'authorization_code',
+        code: access_grant.token,
+        redirect_uri: application.redirect_uri,
+        client_id: application.uid,
+        client_secret: application.secret
+      }
   end
 
   def request_user_info!
-    get '/oauth/userinfo', nil, 'Authorization' => "Bearer #{access_token.token}"
+    get '/oauth/userinfo', params: {}, headers: { 'Authorization' => "Bearer #{access_token.token}" }
   end
 
   context 'Application without OpenID scope' do
diff --git a/spec/requests/rack_attack_global_spec.rb b/spec/requests/rack_attack_global_spec.rb
index c0a3ea397df6af00a48a5ed08223384cbc37e2e9..c27e27d36483b17889062cc62f1f5f53c9829251 100644
--- a/spec/requests/rack_attack_global_spec.rb
+++ b/spec/requests/rack_attack_global_spec.rb
@@ -177,7 +177,7 @@
       context 'when the request is to the api internal endpoints' do
         it 'allows requests over the rate limit' do
           (1 + requests_per_period).times do
-            get url_api_internal, secret_token: Gitlab::Shell.secret_token
+            get url_api_internal, params: { secret_token: Gitlab::Shell.secret_token }
             expect(response).to have_http_status 200
           end
         end
diff --git a/spec/requests/request_profiler_spec.rb b/spec/requests/request_profiler_spec.rb
index 9afeb2983b0a633254f5d5920e557ac2811d7c98..284a51fcc3292cc998ab5034e196bf7db322bffb 100644
--- a/spec/requests/request_profiler_spec.rb
+++ b/spec/requests/request_profiler_spec.rb
@@ -18,7 +18,7 @@
       path    = "/#{project.full_path}"
 
       Timecop.freeze(time) do
-        get path, nil, 'X-Profile-Token' => Gitlab::RequestProfiler.profile_token
+        get path, params: {},  headers: { 'X-Profile-Token' => Gitlab::RequestProfiler.profile_token }
       end
 
       profile_path = "#{Gitlab.config.shared.path}/tmp/requests_profiles/#{path.tr('/', '|')}_#{time.to_i}.html"
diff --git a/spec/support/api/scopes/read_user_shared_examples.rb b/spec/support/api/scopes/read_user_shared_examples.rb
index d7cef137989158a2dc950ae56488d8b236056757..683234264a8bfdb7960cffdfd186b0c0e6b66cdc 100644
--- a/spec/support/api/scopes/read_user_shared_examples.rb
+++ b/spec/support/api/scopes/read_user_shared_examples.rb
@@ -77,7 +77,7 @@
     let(:token) { create(:personal_access_token, scopes: ['read_user'], user: user) }
 
     it 'returns a "403" response' do
-      post api_call.call(path, user, personal_access_token: token), attributes_for(:user, projects_limit: 3)
+      post api_call.call(path, user, personal_access_token: token), params: attributes_for(:user, projects_limit: 3)
 
       expect(response).to have_gitlab_http_status(403)
     end
diff --git a/spec/support/controllers/sessionless_auth_controller_shared_examples.rb b/spec/support/controllers/sessionless_auth_controller_shared_examples.rb
index 7e4958f177a2629515fd45e3a7c6edb0ab3e1449..355555d9d195122afa994c360c73cba3ae007f92 100644
--- a/spec/support/controllers/sessionless_auth_controller_shared_examples.rb
+++ b/spec/support/controllers/sessionless_auth_controller_shared_examples.rb
@@ -16,14 +16,14 @@
               .and increment(:user_session_override_counter)
                      .and increment(:user_sessionless_authentication_counter)
 
-      get path, default_params.merge(private_token: personal_access_token.token)
+      get path, params: default_params.merge(private_token: personal_access_token.token)
 
       expect(response).to have_gitlab_http_status(200)
       expect(controller.current_user).to eq(user)
     end
 
     it 'does not log the user in if page is public', if: params[:public] do
-      get path, default_params
+      get path, params: default_params
 
       expect(response).to have_gitlab_http_status(200)
       expect(controller.current_user).to be_nil
@@ -37,7 +37,7 @@
 
       personal_access_token.update(scopes: [:read_user])
 
-      get path, default_params.merge(private_token: personal_access_token.token)
+      get path, params: default_params.merge(private_token: personal_access_token.token)
 
       expect(response).not_to have_gitlab_http_status(200)
     end
@@ -51,7 +51,7 @@
                      .and increment(:user_sessionless_authentication_counter)
 
       @request.headers['PRIVATE-TOKEN'] = personal_access_token.token
-      get path, default_params
+      get path, params: default_params
 
       expect(response).to have_gitlab_http_status(200)
     end
@@ -64,7 +64,7 @@
               .and increment(:user_session_override_counter)
                      .and increment(:user_sessionless_authentication_counter)
 
-      get path, default_params.merge(feed_token: user.feed_token)
+      get path, params: default_params.merge(feed_token: user.feed_token)
 
       expect(response).to have_gitlab_http_status 200
     end
@@ -75,7 +75,7 @@
       expect(authentication_metrics)
         .to increment(:user_unauthenticated_counter)
 
-      get path, default_params.merge(feed_token: 'token')
+      get path, params: default_params.merge(feed_token: 'token')
 
       expect(response.status).not_to eq 200
     end
@@ -85,7 +85,7 @@
     expect(authentication_metrics)
       .to increment(:user_unauthenticated_counter)
 
-    get path, default_params.merge(private_token: 'token')
+    get path, params: default_params.merge(private_token: 'token')
 
     expect(response.status).not_to eq(200)
   end
diff --git a/spec/support/shared_examples/controllers/issuable_notes_filter_shared_examples.rb b/spec/support/shared_examples/controllers/issuable_notes_filter_shared_examples.rb
index 95e693280806fb38a9a34c7da34f9979717388f8..dbdca99b5aa2dd463b4ece4acfe51ee39659d00b 100644
--- a/spec/support/shared_examples/controllers/issuable_notes_filter_shared_examples.rb
+++ b/spec/support/shared_examples/controllers/issuable_notes_filter_shared_examples.rb
@@ -2,7 +2,7 @@
   it 'sets discussion filter' do
     notes_filter = UserPreference::NOTES_FILTERS[:only_comments]
 
-    get :discussions, namespace_id: project.namespace, project_id: project, id: issuable.iid, notes_filter: notes_filter
+    get :discussions, params: { namespace_id: project.namespace, project_id: project, id: issuable.iid, notes_filter: notes_filter }
 
     expect(user.reload.notes_filter_for(issuable)).to eq(notes_filter)
     expect(UserPreference.count).to eq(1)
@@ -13,7 +13,7 @@
 
     expect_any_instance_of(issuable.class).to receive(:expire_note_etag_cache)
 
-    get :discussions, namespace_id: project.namespace, project_id: project, id: issuable.iid, notes_filter: notes_filter
+    get :discussions, params: { namespace_id: project.namespace, project_id: project, id: issuable.iid, notes_filter: notes_filter }
   end
 
   it 'does not expires notes e-tag cache for issuable if filter did not change' do
@@ -22,14 +22,14 @@
 
     expect_any_instance_of(issuable.class).not_to receive(:expire_note_etag_cache)
 
-    get :discussions, namespace_id: project.namespace, project_id: project, id: issuable.iid, notes_filter: notes_filter
+    get :discussions, params: { namespace_id: project.namespace, project_id: project, id: issuable.iid, notes_filter: notes_filter }
   end
 
   it 'does not set notes filter when database is in read only mode' do
     allow(Gitlab::Database).to receive(:read_only?).and_return(true)
     notes_filter = UserPreference::NOTES_FILTERS[:only_comments]
 
-    get :discussions, namespace_id: project.namespace, project_id: project, id: issuable.iid, notes_filter: notes_filter
+    get :discussions, params: { namespace_id: project.namespace, project_id: project, id: issuable.iid, notes_filter: notes_filter }
 
     expect(user.reload.notes_filter_for(issuable)).to eq(0)
   end
@@ -37,7 +37,7 @@
   it 'returns only user comments' do
     user.set_notes_filter(UserPreference::NOTES_FILTERS[:only_comments], issuable)
 
-    get :discussions, namespace_id: project.namespace, project_id: project, id: issuable.iid
+    get :discussions, params: { namespace_id: project.namespace, project_id: project, id: issuable.iid }
     discussions = JSON.parse(response.body)
 
     expect(discussions.count).to eq(1)
@@ -47,7 +47,7 @@
   it 'returns only activity notes' do
     user.set_notes_filter(UserPreference::NOTES_FILTERS[:only_activity], issuable)
 
-    get :discussions, namespace_id: project.namespace, project_id: project, id: issuable.iid
+    get :discussions, params: { namespace_id: project.namespace, project_id: project, id: issuable.iid }
     discussions = JSON.parse(response.body)
 
     expect(discussions.count).to eq(1)
@@ -60,7 +60,7 @@
 
       expect(ResourceEvents::MergeIntoNotesService).not_to receive(:new)
 
-      get :discussions, namespace_id: project.namespace, project_id: project, id: issuable.iid
+      get :discussions, params: { namespace_id: project.namespace, project_id: project, id: issuable.iid }
     end
   end
 end
diff --git a/spec/support/shared_examples/controllers/set_sort_order_from_user_preference_shared_examples.rb b/spec/support/shared_examples/controllers/set_sort_order_from_user_preference_shared_examples.rb
index b34948be670ab52bb671d86019dd8615ea68efa5..d86838719d428521eee0f4c25b942384c2592276 100644
--- a/spec/support/shared_examples/controllers/set_sort_order_from_user_preference_shared_examples.rb
+++ b/spec/support/shared_examples/controllers/set_sort_order_from_user_preference_shared_examples.rb
@@ -15,7 +15,7 @@
 
         expect_any_instance_of(UserPreference).not_to receive(:update_attribute).with(sorting_field, sorting_param)
 
-        get :index, namespace_id: project.namespace, project_id: project, sort: sorting_param
+        get :index, params: { namespace_id: project.namespace, project_id: project, sort: sorting_param }
       end
     end
 
@@ -25,7 +25,7 @@
 
         expect_any_instance_of(UserPreference).to receive(:update_attribute).with(sorting_field, sorting_param)
 
-        get :index, namespace_id: project.namespace, project_id: project, sort: sorting_param
+        get :index, params: { namespace_id: project.namespace, project_id: project, sort: sorting_param }
       end
     end
   end
diff --git a/spec/support/shared_examples/issuables_list_metadata_shared_examples.rb b/spec/support/shared_examples/issuables_list_metadata_shared_examples.rb
index f4bc6f8efa5fe601cff7fc0fc675ab70857f923e..90d67fd00fca8bee628411fb599eb9f018daddbd 100644
--- a/spec/support/shared_examples/issuables_list_metadata_shared_examples.rb
+++ b/spec/support/shared_examples/issuables_list_metadata_shared_examples.rb
@@ -3,9 +3,9 @@
 
   def get_action(action, project)
     if action
-      get action, author_id: project.creator.id
+      get action, params: { author_id: project.creator.id }
     else
-      get :index, namespace_id: project.namespace, project_id: project
+      get :index, params: { namespace_id: project.namespace, project_id: project }
     end
   end
 
@@ -51,9 +51,9 @@ def create_issuable(issuable_type, project, source_branch:)
     it "doesn't execute any queries with false conditions" do
       get_empty =
         if action
-          proc { get action, author_id: project.creator.id }
+          proc { get action, params: { author_id: project.creator.id } }
         else
-          proc { get :index, namespace_id: project2.namespace, project_id: project2 }
+          proc { get :index, params: { namespace_id: project2.namespace, project_id: project2 } }
         end
 
       expect(&get_empty).not_to make_queries_matching(/WHERE (?:1=0|0=1)/)
diff --git a/spec/support/shared_examples/requests/api/custom_attributes_shared_examples.rb b/spec/support/shared_examples/requests/api/custom_attributes_shared_examples.rb
index 9fc2fbef449be1773f9769f63ad8f43be7df0214..8a7fcf856a1dbb161e29401a4927c8dee598c921 100644
--- a/spec/support/shared_examples/requests/api/custom_attributes_shared_examples.rb
+++ b/spec/support/shared_examples/requests/api/custom_attributes_shared_examples.rb
@@ -9,7 +9,7 @@
 
     context 'with an unauthorized user' do
       it 'does not filter by custom attributes' do
-        get api("/#{attributable_name}", user), custom_attributes: { foo: 'foo', bar: 'bar' }
+        get api("/#{attributable_name}", user), params: { custom_attributes: { foo: 'foo', bar: 'bar' } }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response.size).to be 2
@@ -19,7 +19,7 @@
 
     context 'with an authorized user' do
       it 'filters by custom attributes' do
-        get api("/#{attributable_name}", admin), custom_attributes: { foo: 'foo', bar: 'bar' }
+        get api("/#{attributable_name}", admin), params: { custom_attributes: { foo: 'foo', bar: 'bar' } }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response.size).to be 1
@@ -35,7 +35,7 @@
 
     context 'with an unauthorized user' do
       it 'does not include custom attributes' do
-        get api("/#{attributable_name}", user), with_custom_attributes: true
+        get api("/#{attributable_name}", user), params: { with_custom_attributes: true }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response.size).to be 2
@@ -54,7 +54,7 @@
       end
 
       it 'includes custom attributes if requested' do
-        get api("/#{attributable_name}", admin), with_custom_attributes: true
+        get api("/#{attributable_name}", admin), params: { with_custom_attributes: true }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response.size).to be 2
@@ -75,7 +75,7 @@
   describe "GET /#{attributable_name}/:id with custom attributes" do
     context 'with an unauthorized user' do
       it 'does not include custom attributes' do
-        get api("/#{attributable_name}/#{attributable.id}", user), with_custom_attributes: true
+        get api("/#{attributable_name}/#{attributable.id}", user), params: { with_custom_attributes: true }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response).not_to include 'custom_attributes'
@@ -91,7 +91,7 @@
       end
 
       it 'includes custom attributes if requested' do
-        get api("/#{attributable_name}/#{attributable.id}", admin), with_custom_attributes: true
+        get api("/#{attributable_name}/#{attributable.id}", admin), params: { with_custom_attributes: true }
 
         expect(response).to have_gitlab_http_status(200)
         expect(json_response['custom_attributes']).to contain_exactly(
@@ -141,7 +141,7 @@
 
   describe "PUT /#{attributable_name}/:id/custom_attributes/:key" do
     context 'with an unauthorized user' do
-      subject { put api("/#{attributable_name}/#{attributable.id}/custom_attributes/foo", user), value: 'new' }
+      subject { put api("/#{attributable_name}/#{attributable.id}/custom_attributes/foo", user), params: { value: 'new' } }
 
       it_behaves_like 'an unauthorized API user'
     end
@@ -149,7 +149,7 @@
     context 'with an authorized user' do
       it 'creates a new custom attribute' do
         expect do
-          put api("/#{attributable_name}/#{attributable.id}/custom_attributes/new", admin), value: 'new'
+          put api("/#{attributable_name}/#{attributable.id}/custom_attributes/new", admin), params: { value: 'new' }
         end.to change { attributable.custom_attributes.count }.by(1)
 
         expect(response).to have_gitlab_http_status(200)
@@ -159,7 +159,7 @@
 
       it 'updates an existing custom attribute' do
         expect do
-          put api("/#{attributable_name}/#{attributable.id}/custom_attributes/foo", admin), value: 'new'
+          put api("/#{attributable_name}/#{attributable.id}/custom_attributes/foo", admin), params: { value: 'new' }
         end.not_to change { attributable.custom_attributes.count }
 
         expect(response).to have_gitlab_http_status(200)
diff --git a/spec/support/shared_examples/requests/api/status_shared_examples.rb b/spec/support/shared_examples/requests/api/status_shared_examples.rb
index 0ed917e448ae30e801c8789fab282d05aca74ae2..ebfc5fed3bb40f268901ab053edd8fe976f12bdc 100644
--- a/spec/support/shared_examples/requests/api/status_shared_examples.rb
+++ b/spec/support/shared_examples/requests/api/status_shared_examples.rb
@@ -54,7 +54,7 @@
 
   context 'for a modified ressource' do
     before do
-      delete request, params, { 'HTTP_IF_UNMODIFIED_SINCE' => '1990-01-12T00:00:48-0600' }
+      delete request, params: params, headers: { 'HTTP_IF_UNMODIFIED_SINCE' => '1990-01-12T00:00:48-0600' }
     end
 
     it 'returns 412' do
@@ -64,7 +64,7 @@
 
   context 'for an unmodified ressource' do
     before do
-      delete request, params, { 'HTTP_IF_UNMODIFIED_SINCE' => Time.now }
+      delete request, params: params, headers: { 'HTTP_IF_UNMODIFIED_SINCE' => Time.now }
     end
 
     it 'returns accepted' do
diff --git a/spec/support/shared_examples/update_invalid_issuable.rb b/spec/support/shared_examples/update_invalid_issuable.rb
index 1490287681bccf2bf8dd7fa8c6766003648fe35b..64568de424e788fc17382f22fb4d5c08be47041f 100644
--- a/spec/support/shared_examples/update_invalid_issuable.rb
+++ b/spec/support/shared_examples/update_invalid_issuable.rb
@@ -26,7 +26,7 @@
     end
 
     it 'renders edit when format is html' do
-      put :update, params
+      put :update, params: params
 
       expect(response).to render_template(:edit)
       expect(assigns[:conflict]).to be_truthy
@@ -35,7 +35,7 @@
     it 'renders json error message when format is json' do
       params[:format] = "json"
 
-      put :update, params
+      put :update, params: params
 
       expect(response.status).to eq(409)
       expect(JSON.parse(response.body)).to have_key('errors')
@@ -49,7 +49,7 @@
     end
 
     it 'renders edit when merge request is invalid' do
-      put :update, params
+      put :update, params: params
 
       expect(response).to render_template(:edit)
     end