diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2016-12-12 09:55:29 +0100 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2016-12-12 13:46:54 +0100 |
commit | 81a12c10fe7ba6f58ab4d1ae57861aa8899d545f (patch) | |
tree | 284106676aad83a42e30ea509471d504dd42c9cb /spec/requests | |
parent | ff02c63cd3cfbaebb16ed770e377ae318c6be054 (diff) | |
download | gitlab-ce-81a12c10fe7ba6f58ab4d1ae57861aa8899d545f.tar.gz |
API: Fix groups filter
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/groups_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/requests/api/groups_spec.rb b/spec/requests/api/groups_spec.rb index 548ed8e1892..15647b262b6 100644 --- a/spec/requests/api/groups_spec.rb +++ b/spec/requests/api/groups_spec.rb @@ -245,6 +245,17 @@ describe API::Groups, api: true do expect(project_names).to match_array([project1.name, project3.name]) end + it 'filters the groups projects' do + public_projet = create(:project, :public, path: 'test1', group: group1) + + get api("/groups/#{group1.id}/projects", user1), visibility: 'public' + + expect(response).to have_http_status(200) + expect(json_response).to be_an(Array) + expect(json_response.length).to eq(1) + expect(json_response.first['name']).to eq(public_projet.name) + end + it "does not return a non existing group" do get api("/groups/1328/projects", user1) expect(response).to have_http_status(404) |