Commit 0d1009af85c1ed6936a568e9bab9e4da28e69a30
1 parent
8a340818
Exists in
master
and in
4 other branches
"users" GET test added
Showing
1 changed file
with
12 additions
and
0 deletions
Show diff stats
spec/requests/api/projects_spec.rb
| ... | ... | @@ -107,6 +107,18 @@ describe Gitlab::API do |
| 107 | 107 | end |
| 108 | 108 | end |
| 109 | 109 | |
| 110 | + describe "GET /projects/:id/users" do | |
| 111 | + it "should return project users" do | |
| 112 | + get api("/projects/#{project.code}/users", user) | |
| 113 | + | |
| 114 | + response.status.should == 200 | |
| 115 | + | |
| 116 | + json_response.should be_an Array | |
| 117 | + json_response.count.should == 1 | |
| 118 | + json_response.first['user']['id'].should == user.id | |
| 119 | + end | |
| 120 | + end | |
| 121 | + | |
| 110 | 122 | describe "POST /projects/:id/users" do |
| 111 | 123 | it "should add users to project" do |
| 112 | 124 | expect { | ... | ... |