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/controllers/oauth | |
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/controllers/oauth')
-rw-r--r-- | spec/controllers/oauth/applications_controller_spec.rb | 6 | ||||
-rw-r--r-- | spec/controllers/oauth/authorizations_controller_spec.rb | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/spec/controllers/oauth/applications_controller_spec.rb b/spec/controllers/oauth/applications_controller_spec.rb index b4219856fc0..caf2b87428b 100644 --- a/spec/controllers/oauth/applications_controller_spec.rb +++ b/spec/controllers/oauth/applications_controller_spec.rb @@ -26,7 +26,7 @@ describe Oauth::ApplicationsController do 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 @@ describe Oauth::ApplicationsController do 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 @@ describe Oauth::ApplicationsController do } } - 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 8c10ea53a7a..cc8fa2c01b4 100644 --- a/spec/controllers/oauth/authorizations_controller_spec.rb +++ b/spec/controllers/oauth/authorizations_controller_spec.rb @@ -30,7 +30,7 @@ describe Oauth::AuthorizationsController do 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 @@ describe Oauth::AuthorizationsController do 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 @@ describe Oauth::AuthorizationsController do 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) |