From 3de07b4cda9e67087e611056193dfd140b3df1f8 Mon Sep 17 00:00:00 2001 From: prashant-gurung899 Date: Mon, 6 Jan 2025 16:54:07 +0545 Subject: [PATCH] add test to list permissions list of a disabled project space Signed-off-by: prashant-gurung899 --- .../apiSharingNg1/listPermissions.feature | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tests/acceptance/features/apiSharingNg1/listPermissions.feature b/tests/acceptance/features/apiSharingNg1/listPermissions.feature index 27f14d0d6..4d7a6285e 100644 --- a/tests/acceptance/features/apiSharingNg1/listPermissions.feature +++ b/tests/acceptance/features/apiSharingNg1/listPermissions.feature @@ -2535,3 +2535,35 @@ Feature: List a sharing permissions } } """ + + @issue-9764 + Scenario: user tries to list permissions of a disabled project space using root endpoint + Given using spaces DAV path + And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API + And user "Alice" has created a space "new-space" with the default quota using the Graph API + And user "Alice" has disabled a space "new-space" + When user "Alice" tries to list the permissions of space "new-space" using root endpoint of the Graph API + Then the HTTP status code should be "404" + And the JSON data of the response should match + """ + { + "type": "object", + "required": ["error"], + "properties": { + "error": { + "type": "object", + "required": ["code", "innererror", "message"], + "properties": { + "code": { "const": "itemNotFound" }, + "innererror": { + "type": "object", + "required": ["date", "request-id"] + }, + "message": { + "pattern": "stat: error: not found: %user_id_pattern%$" + } + } + } + } + } + """