Fix group_member_spec to not leak information
This commit is contained in:
parent
ca40479c51
commit
4cd04443f5
1 changed files with 7 additions and 5 deletions
|
@ -42,9 +42,10 @@ describe API::API, api: true do
|
|||
end
|
||||
end
|
||||
|
||||
it "users not part of the group should get access error" do
|
||||
it 'users not part of the group should get access error' do
|
||||
get api("/groups/#{group_with_members.id}/members", stranger)
|
||||
expect(response.status).to eq(403)
|
||||
|
||||
expect(response.status).to eq(404)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -165,12 +166,13 @@ describe API::API, api: true do
|
|||
end
|
||||
end
|
||||
|
||||
describe "DELETE /groups/:id/members/:user_id" do
|
||||
context "when not a member of the group" do
|
||||
describe 'DELETE /groups/:id/members/:user_id' do
|
||||
context 'when not a member of the group' do
|
||||
it "should not delete guest's membership of group_with_members" do
|
||||
random_user = create(:user)
|
||||
delete api("/groups/#{group_with_members.id}/members/#{owner.id}", random_user)
|
||||
expect(response.status).to eq(403)
|
||||
|
||||
expect(response.status).to eq(404)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue