diff options
author | blackst0ne <blackst0ne.ru@gmail.com> | 2018-12-18 01:52:17 +0300 |
---|---|---|
committer | blackst0ne <blackst0ne.ru@gmail.com> | 2018-12-19 02:04:31 +0300 |
commit | b44a2c801a64fb282cea794871fcfcf81e4ec539 (patch) | |
tree | 32e699b6efa548048abe11f29f84e85e3d2a034f /spec/support/controllers | |
parent | 5d68c23792e87e710877e4baf57605bcf11a6cb5 (diff) |
Update specs to rails5 format
Updates specs to use new rails5 format.
The old format:
`get :show, { some: params }, { some: headers }`
The new format:
`get :show, params: { some: params }, headers: { some: headers }`
Diffstat (limited to 'spec/support/controllers')
-rw-r--r-- | spec/support/controllers/sessionless_auth_controller_shared_examples.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/support/controllers/sessionless_auth_controller_shared_examples.rb b/spec/support/controllers/sessionless_auth_controller_shared_examples.rb index 7e4958f177a..355555d9d19 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 @@ shared_examples 'authenticates sessionless user' do |path, format, params| .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 @@ shared_examples 'authenticates sessionless user' do |path, format, params| 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 @@ shared_examples 'authenticates sessionless user' do |path, format, params| .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 @@ shared_examples 'authenticates sessionless user' do |path, format, params| .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 @@ shared_examples 'authenticates sessionless user' do |path, format, params| 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 @@ shared_examples 'authenticates sessionless user' do |path, format, params| 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 |