diff options
Diffstat (limited to 'spec/requests/api/tags_spec.rb')
-rw-r--r-- | spec/requests/api/tags_spec.rb | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/spec/requests/api/tags_spec.rb b/spec/requests/api/tags_spec.rb index 98f995df06f..12cfac96d31 100644 --- a/spec/requests/api/tags_spec.rb +++ b/spec/requests/api/tags_spec.rb @@ -193,7 +193,7 @@ describe API::Tags do shared_examples_for 'repository new tag' do it 'creates a new tag' do - post api(route, current_user), tag_name: tag_name, ref: 'master' + post api(route, current_user), params: { tag_name: tag_name, ref: 'master' } expect(response).to have_gitlab_http_status(201) expect(response).to match_response_schema('public_api/v4/tag') @@ -248,26 +248,26 @@ describe API::Tags do end it 'returns 400 if tag name is invalid' do - post api(route, current_user), tag_name: 'new design', ref: 'master' + post api(route, current_user), params: { tag_name: 'new design', ref: 'master' } expect(response).to have_gitlab_http_status(400) expect(json_response['message']).to eq('Tag name invalid') end it 'returns 400 if tag already exists' do - post api(route, current_user), tag_name: 'new_design1', ref: 'master' + post api(route, current_user), params: { tag_name: 'new_design1', ref: 'master' } expect(response).to have_gitlab_http_status(201) expect(response).to match_response_schema('public_api/v4/tag') - post api(route, current_user), tag_name: 'new_design1', ref: 'master' + post api(route, current_user), params: { tag_name: 'new_design1', ref: 'master' } expect(response).to have_gitlab_http_status(400) expect(json_response['message']).to eq('Tag new_design1 already exists') end it 'returns 400 if ref name is invalid' do - post api(route, current_user), tag_name: 'new_design3', ref: 'foo' + post api(route, current_user), params: { tag_name: 'new_design3', ref: 'foo' } expect(response).to have_gitlab_http_status(400) expect(json_response['message']).to eq('Target foo is invalid') @@ -275,7 +275,7 @@ describe API::Tags do context 'lightweight tags with release notes' do it 'creates a new tag' do - post api(route, current_user), tag_name: tag_name, ref: 'master', release_description: 'Wow' + post api(route, current_user), params: { tag_name: tag_name, ref: 'master', release_description: 'Wow' } expect(response).to have_gitlab_http_status(201) expect(response).to match_response_schema('public_api/v4/tag') @@ -294,7 +294,7 @@ describe API::Tags do system(*%W(#{Gitlab.config.git.bin_path} --git-dir=#{repo_path} config user.name #{user.name})) system(*%W(#{Gitlab.config.git.bin_path} --git-dir=#{repo_path} config user.email #{user.email})) - post api(route, current_user), tag_name: 'v7.1.0', ref: 'master', message: 'Release 7.1.0' + post api(route, current_user), params: { tag_name: 'v7.1.0', ref: 'master', message: 'Release 7.1.0' } expect(response).to have_gitlab_http_status(201) expect(response).to match_response_schema('public_api/v4/tag') @@ -360,7 +360,7 @@ describe API::Tags do shared_examples_for 'repository new release' do it 'creates description for existing git tag' do - post api(route, user), description: description + post api(route, user), params: { description: description } expect(response).to have_gitlab_http_status(201) expect(response).to match_response_schema('public_api/v4/release') @@ -372,7 +372,7 @@ describe API::Tags do let(:tag_name) { 'unknown' } it_behaves_like '404 response' do - let(:request) { post api(route, current_user), description: description } + let(:request) { post api(route, current_user), params: { description: description } } let(:message) { 'Tag does not exist' } end end @@ -381,7 +381,7 @@ describe API::Tags do include_context 'disabled repository' it_behaves_like '403 response' do - let(:request) { post api(route, current_user), description: description } + let(:request) { post api(route, current_user), params: { description: description } } end end end @@ -404,7 +404,7 @@ describe API::Tags do end it 'returns 409 if there is already a release' do - post api(route, user), description: description + post api(route, user), params: { description: description } expect(response).to have_gitlab_http_status(409) expect(json_response['message']).to eq('Release already exists') @@ -426,7 +426,7 @@ describe API::Tags do end it 'updates the release description' do - put api(route, current_user), description: new_description + put api(route, current_user), params: { description: new_description } expect(response).to have_gitlab_http_status(200) expect(json_response['tag_name']).to eq(tag_name) @@ -438,7 +438,7 @@ describe API::Tags do let(:tag_name) { 'unknown' } it_behaves_like '404 response' do - let(:request) { put api(route, current_user), description: new_description } + let(:request) { put api(route, current_user), params: { description: new_description } } let(:message) { 'Tag does not exist' } end end @@ -447,7 +447,7 @@ describe API::Tags do include_context 'disabled repository' it_behaves_like '403 response' do - let(:request) { put api(route, current_user), description: new_description } + let(:request) { put api(route, current_user), params: { description: new_description } } end end end @@ -465,7 +465,7 @@ describe API::Tags do context 'when release does not exist' do it_behaves_like '404 response' do - let(:request) { put api(route, current_user), description: new_description } + let(:request) { put api(route, current_user), params: { description: new_description } } let(:message) { 'Release does not exist' } end end |