Commit cc4b2151 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Add :nested_groups metadata to tests using subgroups

parent b1245604
...@@ -490,7 +490,7 @@ describe API::Groups do ...@@ -490,7 +490,7 @@ describe API::Groups do
expect(json_response.first['visibility']).not_to be_present expect(json_response.first['visibility']).not_to be_present
end end
it 'filters the groups projects' do it "filters the groups projects" do
public_project = create(:project, :public, path: 'test1', group: group1) public_project = create(:project, :public, path: 'test1', group: group1)
get api("/groups/#{group1.id}/projects", user1), visibility: 'public' get api("/groups/#{group1.id}/projects", user1), visibility: 'public'
...@@ -502,7 +502,7 @@ describe API::Groups do ...@@ -502,7 +502,7 @@ describe API::Groups do
expect(json_response.first['name']).to eq(public_project.name) expect(json_response.first['name']).to eq(public_project.name)
end end
it 'returns projects excluding shared' do it "returns projects excluding shared" do
create(:project_group_link, project: create(:project), group: group1) create(:project_group_link, project: create(:project), group: group1)
create(:project_group_link, project: create(:project), group: group1) create(:project_group_link, project: create(:project), group: group1)
create(:project_group_link, project: create(:project), group: group1) create(:project_group_link, project: create(:project), group: group1)
...@@ -515,7 +515,7 @@ describe API::Groups do ...@@ -515,7 +515,7 @@ describe API::Groups do
expect(json_response.length).to eq(2) expect(json_response.length).to eq(2)
end end
it 'returns projects including those in subgroups' do it "returns projects including those in subgroups", :nested_groups do
subgroup = create(:group, parent: group1) subgroup = create(:group, parent: group1)
create(:project, group: subgroup) create(:project, group: subgroup)
create(:project, group: subgroup) create(:project, group: subgroup)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment