Skip to content

Commit 12c6f42

Browse files
committed
test(resources): expect 404 when not found
1 parent 3bdb744 commit 12c6f42

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/namespace-resources/namespace-resources.e2e-spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ describe('ResourcesController (e2e)', () => {
399399
`/api/v1/namespaces/${client.namespace.id}/resources/non-existent-id`,
400400
)
401401
.send(updateData)
402-
.expect(HttpStatus.FORBIDDEN);
402+
.expect(HttpStatus.NOT_FOUND);
403403
});
404404

405405
it('should fail with missing namespaceId', async () => {
@@ -458,7 +458,7 @@ describe('ResourcesController (e2e)', () => {
458458
.delete(
459459
`/api/v1/namespaces/${client.namespace.id}/resources/non-existent-id`,
460460
)
461-
.expect(HttpStatus.FORBIDDEN);
461+
.expect(HttpStatus.NOT_FOUND);
462462
});
463463
});
464464

@@ -774,7 +774,7 @@ describe('ResourcesController (e2e)', () => {
774774
.post(
775775
`/api/v1/namespaces/${client.namespace.id}/resources/non-existent-source/move/${targetFolderId}`,
776776
)
777-
.expect(HttpStatus.FORBIDDEN);
777+
.expect(HttpStatus.NOT_FOUND);
778778
});
779779

780780
it('should fail with non-existent target resource', async () => {
@@ -946,7 +946,7 @@ describe('ResourcesController (e2e)', () => {
946946
.post(
947947
`/api/v1/namespaces/${client.namespace.id}/resources/non-existent-id/restore`,
948948
)
949-
.expect(HttpStatus.INTERNAL_SERVER_ERROR);
949+
.expect(HttpStatus.NOT_FOUND);
950950
});
951951
});
952952

0 commit comments

Comments
 (0)