Skip to content

Commit

Permalink
Add spec for .all_group_members
Browse files Browse the repository at this point in the history
  • Loading branch information
garaujodev committed Apr 25, 2022
1 parent fcab58c commit 068cc77
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions spec/gitlab/client/groups_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,23 @@
end
end

describe '.all_group_members' do
before do
stub_get('/groups/3/members/all', 'group_members')
@all_members = Gitlab.all_group_members(3)
end

it 'gets the correct resource' do
expect(a_get('/groups/3/members/all')).to have_been_made
end

it "returns information about a group's members" do
expect(@all_members).to be_a Gitlab::PaginatedResponse
expect(@all_members.size).to eq(2)
expect(@all_members[1].name).to eq('John Smith')
end
end

describe '.group_descendants' do
before do
stub_get('/groups/3/descendant_groups', 'group_descendants')
Expand Down

0 comments on commit 068cc77

Please sign in to comment.