test(graph): root children permission denied is 404

This commit is contained in:
Dominik Schmidt committed 2026-10-15 19:29:53 +02:00
1 parent 7e188c8582
commit 0ebe5a2fa1
1 file changed
+2 -2
@@ -142,7 +142,7 @@ var _ = Describe("Driveitems", func() {
Expect(rr.Code).To(Equal(http.StatusNotFound))
})
It("handles ListContainer permission denied", func() {
It("handles ListContainer permission denied as not found", func() {
gatewayClient.On("ListStorageSpaces", mock.Anything, mock.Anything).Return(&provider.ListStorageSpacesResponse{
Status: status.NewOK(ctx),
StorageSpaces: []*provider.StorageSpace{{Owner: currentUser, Root: &provider.ResourceId{}}},
@@ -154,7 +154,7 @@ var _ = Describe("Driveitems", func() {
r := httptest.NewRequest(http.MethodGet, "/graph/v1.0/me/drive/root/children", nil)
r = r.WithContext(revactx.ContextSetUser(ctx, currentUser))
svc.GetRootDriveChildren(rr, r)
Expect(rr.Code).To(Equal(http.StatusForbidden))
Expect(rr.Code).To(Equal(http.StatusNotFound))
})
It("handles ListContainer error", func() {