diff options
author | Jasper Maes <jaspermaes.jm@gmail.com> | 2018-12-16 15:01:11 +0300 |
---|---|---|
committer | Jasper Maes <jaspermaes.jm@gmail.com> | 2018-12-16 15:45:19 +0300 |
commit | de399c4a497a08cff956ba6ad244b01f6c5afa63 (patch) | |
tree | 4e1633ef3e932bdfc1b2f0838880a9b5af210de6 /spec/requests | |
parent | 8b4602041cf2c4a8738a4796d78720017249249f (diff) |
Fix deprecation: Comparing equality between ActionController::Parameters and a Hash is deprecated
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/jwt_controller_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/requests/jwt_controller_spec.rb b/spec/requests/jwt_controller_spec.rb index e042d772718..2d87d236d61 100644 --- a/spec/requests/jwt_controller_spec.rb +++ b/spec/requests/jwt_controller_spec.rb @@ -31,7 +31,7 @@ describe JwtController do context 'project with enabled CI' do subject! { get '/jwt/auth', parameters, headers } - it { expect(service_class).to have_received(:new).with(project, nil, parameters) } + it { expect(service_class).to have_received(:new).with(project, nil, ActionController::Parameters.new(parameters).permit!) } end context 'project with disabled CI' do @@ -57,7 +57,7 @@ describe JwtController do it 'authenticates correctly' do expect(response).to have_gitlab_http_status(200) - expect(service_class).to have_received(:new).with(nil, user, parameters) + expect(service_class).to have_received(:new).with(nil, user, ActionController::Parameters.new(parameters).permit!) end end end @@ -68,7 +68,7 @@ describe JwtController do subject! { get '/jwt/auth', parameters, headers } - it { expect(service_class).to have_received(:new).with(nil, user, parameters) } + it { expect(service_class).to have_received(:new).with(nil, user, ActionController::Parameters.new(parameters).permit!) } context 'when passing a flat array of scopes' do # We use this trick to make rails to generate a query_string: @@ -83,7 +83,7 @@ describe JwtController do end let(:service_parameters) do - { service: service_name, scopes: %w(scope1 scope2) } + ActionController::Parameters.new({ service: service_name, scopes: %w(scope1 scope2) }).permit! end it { expect(service_class).to have_received(:new).with(nil, user, service_parameters) } |