Skip to content

Commit

Permalink
adding test for deleting/removing share link of project space using p…
Browse files Browse the repository at this point in the history
…ermission endpoint (#9233)
  • Loading branch information
nirajacharya2 authored May 30, 2024
1 parent 73d7f32 commit a5c6ea6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/acceptance/features/apiSharingNg/removeAccessToDrive.feature
Original file line number Diff line number Diff line change
Expand Up @@ -215,3 +215,15 @@ Feature: Remove access to a drive
| permissionsRole | internal |
When user "Brian" tries to remove the link from space "NewSpace" owned by "Alice" using root endpoint of the Graph API
Then the HTTP status code should be "500"


Scenario: remove link share of a project drive using permissions 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 "projectSpace" with the default quota using the Graph API
And user "Alice" has created the following space link share:
| space | projectSpace |
| permissionsRole | view |
| password | $heLlo*1234* |
When user "Alice" deletes the last link share of space "projectSpace" using permissions endpoint of the Graph API
Then the HTTP status code should be "204"
12 changes: 12 additions & 0 deletions tests/acceptance/features/bootstrap/SharingNgContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -1578,4 +1578,16 @@ public function userTriesToListThePermissionsOfSpaceOwnedByUsingRootEndpointOfTh
);
$this->featureContext->setResponse($response);
}

/**
* @When user :user deletes the last link share of space :space using permissions endpoint of the Graph API
*
* @param string $user
* @param string $space
*
* @return void
*/
public function userDeletsTheLastLinkShareOfSpaceUsingPermissionsEndpointOfGraphApi(string $user, string $space):void {
$this->featureContext->setResponse($this->removeAccessToSpaceItem($user, 'link', $space, ''));
}
}

0 comments on commit a5c6ea6

Please sign in to comment.