diff options
author | Rémy Coutable <remy@rymai.me> | 2018-12-17 15:34:55 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-12-17 15:34:55 +0300 |
commit | c59ff995a46457fed880bbebb0f32ad0cd8961cf (patch) | |
tree | e8819b2a9eb9cdc46fea0ff5b11147010e66cc41 /spec/requests | |
parent | 368198d8ccbca3d8bba39c2e6ff8ad559db6e2e7 (diff) | |
parent | de399c4a497a08cff956ba6ad244b01f6c5afa63 (diff) |
Merge branch 'deprecated-comparing-actioncontroller-params-hash' into 'master'
Fix deprecation: Comparing equality between ActionController::Parameters and a Hash is deprecated
See merge request gitlab-org/gitlab-ce!23855
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) } |