diff options
author | blackst0ne <blackst0ne.ru@gmail.com> | 2018-12-18 09:52:17 +1100 |
---|---|---|
committer | blackst0ne <blackst0ne.ru@gmail.com> | 2018-12-19 10:04:31 +1100 |
commit | b44a2c801a64fb282cea794871fcfcf81e4ec539 (patch) | |
tree | 32e699b6efa548048abe11f29f84e85e3d2a034f /spec/requests/api/repositories_spec.rb | |
parent | 5d68c23792e87e710877e4baf57605bcf11a6cb5 (diff) | |
download | gitlab-ce-b44a2c801a64fb282cea794871fcfcf81e4ec539.tar.gz |
Update specs to rails5 formatblackst0ne-convert-specs-rails5-style
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/repositories_spec.rb')
-rw-r--r-- | spec/requests/api/repositories_spec.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/requests/api/repositories_spec.rb b/spec/requests/api/repositories_spec.rb index de141377793..181fe6246ae 100644 --- a/spec/requests/api/repositories_spec.rb +++ b/spec/requests/api/repositories_spec.rb @@ -297,7 +297,7 @@ describe API::Repositories do expect(::Gitlab::Git::Compare).to receive(:new).with(anything, anything, anything, { straight: false }).and_call_original - get api(route, current_user), from: 'master', to: 'feature' + get api(route, current_user), params: { from: 'master', to: 'feature' } expect(response).to have_gitlab_http_status(200) expect(json_response['commits']).to be_present @@ -308,7 +308,7 @@ describe API::Repositories do expect(::Gitlab::Git::Compare).to receive(:new).with(anything, anything, anything, { straight: false }).and_call_original - get api(route, current_user), from: 'master', to: 'feature', straight: false + get api(route, current_user), params: { from: 'master', to: 'feature', straight: false } expect(response).to have_gitlab_http_status(200) expect(json_response['commits']).to be_present @@ -319,7 +319,7 @@ describe API::Repositories do expect(::Gitlab::Git::Compare).to receive(:new).with(anything, anything, anything, { straight: true }).and_call_original - get api(route, current_user), from: 'master', to: 'feature', straight: true + get api(route, current_user), params: { from: 'master', to: 'feature', straight: true } expect(response).to have_gitlab_http_status(200) expect(json_response['commits']).to be_present @@ -327,7 +327,7 @@ describe API::Repositories do end it "compares tags" do - get api(route, current_user), from: 'v1.0.0', to: 'v1.1.0' + get api(route, current_user), params: { from: 'v1.0.0', to: 'v1.1.0' } expect(response).to have_gitlab_http_status(200) expect(json_response['commits']).to be_present @@ -335,7 +335,7 @@ describe API::Repositories do end it "compares commits" do - get api(route, current_user), from: sample_commit.id, to: sample_commit.parent_id + get api(route, current_user), params: { from: sample_commit.id, to: sample_commit.parent_id } expect(response).to have_gitlab_http_status(200) expect(json_response['commits']).to be_empty @@ -344,7 +344,7 @@ describe API::Repositories do end it "compares commits in reverse order" do - get api(route, current_user), from: sample_commit.parent_id, to: sample_commit.id + get api(route, current_user), params: { from: sample_commit.parent_id, to: sample_commit.id } expect(response).to have_gitlab_http_status(200) expect(json_response['commits']).to be_present @@ -352,7 +352,7 @@ describe API::Repositories do end it "compares same refs" do - get api(route, current_user), from: 'master', to: 'master' + get api(route, current_user), params: { from: 'master', to: 'master' } expect(response).to have_gitlab_http_status(200) expect(json_response['commits']).to be_empty @@ -410,7 +410,7 @@ describe API::Repositories do context 'using sorting' do context 'by commits desc' do it 'returns the repository contribuors sorted by commits desc' do - get api(route, current_user), { order_by: 'commits', sort: 'desc' } + get api(route, current_user), params: { order_by: 'commits', sort: 'desc' } expect(response).to have_gitlab_http_status(200) expect(response).to match_response_schema('contributors') @@ -420,7 +420,7 @@ describe API::Repositories do context 'by name desc' do it 'returns the repository contribuors sorted by name asc case insensitive' do - get api(route, current_user), { order_by: 'name', sort: 'asc' } + get api(route, current_user), params: { order_by: 'name', sort: 'asc' } expect(response).to have_gitlab_http_status(200) expect(response).to match_response_schema('contributors') @@ -478,7 +478,7 @@ describe API::Repositories do end subject(:request) do - get(api("/projects/#{project.id}/repository/merge_base", current_user), refs: refs) + get(api("/projects/#{project.id}/repository/merge_base", current_user), params: { refs: refs }) end shared_examples 'merge base' do |