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/requests/api/submodules_spec.rb | |
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/requests/api/submodules_spec.rb')
-rw-r--r-- | spec/requests/api/submodules_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/requests/api/submodules_spec.rb b/spec/requests/api/submodules_spec.rb index fa447c028c2..c482a85c68f 100644 --- a/spec/requests/api/submodules_spec.rb +++ b/spec/requests/api/submodules_spec.rb @@ -31,7 +31,7 @@ describe API::Submodules do describe "PUT /projects/:id/repository/submodule/:submodule" do context 'when unauthenticated' do it 'returns 401' do - put api(route(submodule)), params + put api(route(submodule)), params: params expect(response).to have_gitlab_http_status(401) end @@ -39,7 +39,7 @@ describe API::Submodules do context 'when authenticated', 'as a guest' do it 'returns 403' do - put api(route(submodule), guest), params + put api(route(submodule), guest), params: params expect(response).to have_gitlab_http_status(403) end @@ -53,13 +53,13 @@ describe API::Submodules do end it 'returns 400 if branch is missing' do - put api(route(submodule), user), params.except(:branch) + put api(route(submodule), user), params: params.except(:branch) expect(response).to have_gitlab_http_status(400) end it 'returns 400 if commit_sha is missing' do - put api(route(submodule), user), params.except(:commit_sha) + put api(route(submodule), user), params: params.except(:commit_sha) expect(response).to have_gitlab_http_status(400) end @@ -67,7 +67,7 @@ describe API::Submodules do it 'returns the commmit' do head_commit = project.repository.commit.id - put api(route(submodule), user), params + put api(route(submodule), user), params: params expect(response).to have_gitlab_http_status(200) expect(json_response['message']).to eq commit_message @@ -87,7 +87,7 @@ describe API::Submodules do .with(any_args, hash_including(submodule: submodule)) .and_call_original - put api(route(encoded_submodule), user), params + put api(route(encoded_submodule), user), params: params expect(response).to have_gitlab_http_status(200) expect(json_response['id']).to eq project.repository.commit(branch).id |