mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-07-13 00:52:01 -04:00
test(apiSpaces): a space admin can delete a space with no manager (#3040)
#1877 reordered the api-test teardown to delete spaces before users, so the state where a project space's manager has been deleted is no longer exercised. This adds explicit coverage for it: the only manager of a project space is deleted, and a space admin can still list and delete (disable + purge) the space. Related: #1878
This commit is contained in:
@@ -248,3 +248,27 @@ Feature: Disabling, restoring and deleting space
|
||||
| user-role |
|
||||
| User |
|
||||
| User Light |
|
||||
|
||||
@issue-1878
|
||||
Scenario: a space admin can list and delete a project space whose manager was deleted
|
||||
Given the administrator has assigned the role "Space Admin" to user "Brian" using the Graph API
|
||||
When the administrator deletes user "Alice" using the provisioning API
|
||||
Then the HTTP status code should be "204"
|
||||
When user "Brian" lists all spaces via the Graph API with query "$filter=driveType eq 'project'"
|
||||
Then the HTTP status code should be "200"
|
||||
And the JSON response should contain space called "Project Moon" and match
|
||||
"""
|
||||
{
|
||||
"type": "object",
|
||||
"required": ["name", "id", "driveType"],
|
||||
"properties": {
|
||||
"name": { "type": "string", "enum": ["Project Moon"] },
|
||||
"driveType": { "type": "string", "enum": ["project"] }
|
||||
}
|
||||
}
|
||||
"""
|
||||
When user "Brian" disables a space "Project Moon" owned by user "Alice"
|
||||
Then the HTTP status code should be "204"
|
||||
When user "Brian" deletes a space "Project Moon" owned by user "Alice"
|
||||
Then the HTTP status code should be "204"
|
||||
And the user "Brian" should not have a space called "Project Moon"
|
||||
|
||||
Reference in New Issue
Block a user