Commit d64e5f62 authored by Jasper Maes's avatar Jasper Maes

Fix deprecation: Comparing equality between ActionController::Parameters and a Hash is deprecated

parent 853a365c
---
title: 'Fix deprecation: Comparing equality between ActionController::Parameters and
a Hash is deprecated'
merge_request: 8914
author: Jasper Maes
type: other
......@@ -37,7 +37,7 @@ describe Oauth::Jira::AuthorizationsController do
'grant_type' => 'authorization_code',
'redirect_uri' => 'http://test.host/login/oauth/callback' }
expect(Gitlab::HTTP).to receive(:post).with(oauth_token_url, allow_local_requests: true, body: expected_auth_params) do
expect(Gitlab::HTTP).to receive(:post).with(oauth_token_url, allow_local_requests: true, body: ActionController::Parameters.new(expected_auth_params)) do
{ 'access_token' => 'fake-123', 'scope' => 'foo', 'token_type' => 'bar' }
end
......
......@@ -114,7 +114,7 @@ describe Projects::VulnerabilityFeedbackController do
context 'with valid params' do
it 'returns the created feedback' do
allow(VulnerabilityFeedbackModule::CreateService)
.to receive(:new).with(project, user, create_params)
.to receive(:new).with(project, user, ActionController::Parameters.new(create_params).permit!)
.and_call_original
create_feedback user: user, project: project, params: create_params
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment