diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2016-04-12 19:52:43 +0300 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2016-04-13 15:26:41 +0300 |
commit | 3ab9ea8dae1edc6ab8c8563843342890736eb24c (patch) | |
tree | ca7d663b5f6761db6973101338bf8c5fb8a838e6 /spec/requests/api/projects_spec.rb | |
parent | ea2193aaeb1127746dc78d2dda7037d998911662 (diff) |
Make staring API more restful
Diffstat (limited to 'spec/requests/api/projects_spec.rb')
-rw-r--r-- | spec/requests/api/projects_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb index f05622f77fe..2a7c55fe65e 100644 --- a/spec/requests/api/projects_spec.rb +++ b/spec/requests/api/projects_spec.rb @@ -1045,7 +1045,7 @@ describe API::API, api: true do end end - describe 'POST /projects/:id/unstar' do + describe 'DELETE /projects/:id/star' do context 'on a starred project' do before do user.toggle_star(project) @@ -1053,16 +1053,16 @@ describe API::API, api: true do end it 'unstars the project' do - post api("/projects/#{project.id}/unstar", user) + delete api("/projects/#{project.id}/star", user) - expect(response.status).to eq(201) + expect(response.status).to eq(200) expect(json_response['star_count']).to eq(0) end end context 'on an unstarred project' do it 'does not modify the star count' do - post api("/projects/#{project.id}/unstar", user) + delete api("/projects/#{project.id}/star", user) expect(response.status).to eq(304) expect(project.star_count).to eq(0) |