diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-03-06 12:00:15 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-03-06 12:00:15 +0100 |
commit | d5f7060400a06d98f9e7107949aca8d89eaba7a8 (patch) | |
tree | 59654b4ea96870ebb3bf1bf8f56e18509adc5924 /spec | |
parent | 01f99bd26910bb2b0480c44e752bdc7de107cfb1 (diff) | |
download | gitlab-ce-d5f7060400a06d98f9e7107949aca8d89eaba7a8.tar.gz |
Rename `/take` to `/take_ownership`, expose `owner` in `v3`.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/requests/api/triggers_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/requests/api/triggers_spec.rb b/spec/requests/api/triggers_spec.rb index c4e8c9b09d7..424c02932ab 100644 --- a/spec/requests/api/triggers_spec.rb +++ b/spec/requests/api/triggers_spec.rb @@ -238,12 +238,12 @@ describe API::Triggers do end end - describe 'POST /projects/:id/triggers/:trigger_id/take' do + describe 'POST /projects/:id/triggers/:trigger_id/take_ownership' do context 'authenticated user with valid permissions' do it 'updates owner' do expect(trigger.owner).to be_nil - post api("/projects/#{project.id}/triggers/#{trigger.id}/take", user) + post api("/projects/#{project.id}/triggers/#{trigger.id}/take_ownership", user) expect(response).to have_http_status(200) expect(json_response).to include('owner') @@ -253,7 +253,7 @@ describe API::Triggers do context 'authenticated user with invalid permissions' do it 'does not update owner' do - post api("/projects/#{project.id}/triggers/#{trigger.id}/take", user2) + post api("/projects/#{project.id}/triggers/#{trigger.id}/take_ownership", user2) expect(response).to have_http_status(403) end @@ -261,7 +261,7 @@ describe API::Triggers do context 'unauthenticated user' do it 'does not update owner' do - post api("/projects/#{project.id}/triggers/#{trigger.id}/take") + post api("/projects/#{project.id}/triggers/#{trigger.id}/take_ownership") expect(response).to have_http_status(401) end |