From ef7ff6e6954eb133c5bc6ea7df68cabafe0e114a Mon Sep 17 00:00:00 2001 From: Viktor Scharf Date: Wed, 28 Jun 2023 16:22:09 +0200 Subject: [PATCH] [test-only] personal space is deleted after a user is deleted test (#6642) * ensure that personal space is deleted after deliting user * add test with accepted share * fix after review * Update deleteUser.feature --- .../features/apiGraph/deleteUser.feature | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/acceptance/features/apiGraph/deleteUser.feature b/tests/acceptance/features/apiGraph/deleteUser.feature index 43af088ec..2920ed3fb 100644 --- a/tests/acceptance/features/apiGraph/deleteUser.feature +++ b/tests/acceptance/features/apiGraph/deleteUser.feature @@ -143,3 +143,26 @@ Feature: delete user | User Light | User | | User Light | User Light | | User Light | Admin | + + + Scenario: personal space is deleted automatically when the user is deleted + Given the administrator has assigned the role "Admin" to user "Alice" using the Graph API + And user "Brian" has been created with default attributes and without skeleton files + When the user "Alice" deletes a user "Brian" using the Graph API + Then the HTTP status code should be "204" + When user "Alice" lists all spaces via the GraphApi with query "$filter=driveType eq 'personal'" + Then the json responded should not contain a space with name "Brian Murphy" + + + Scenario: accepted share is deleted automatically when the user is deleted + Given the administrator has assigned the role "Admin" to user "Alice" using the Graph API + And user "Brian" has been created with default attributes and without skeleton files + And user "Brian" has created a folder "new" in space "Brian Murphy" + And user "Brian" has created a share inside of space "Brian Murphy" with settings: + | path | new | + | shareWith | Alice | + | role | viewer | + And user "Alice" has accepted share "/new" offered by user "Brian" + When the user "Alice" deletes a user "Brian" using the Graph API + Then the HTTP status code should be "204" + And as "Alice" folder "Shares/new" should not exist