Skip to content

Commit

Permalink
add tests for update share invitation for root endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
amrita-shrestha committed May 3, 2024
1 parent db281c4 commit 8b9c623
Show file tree
Hide file tree
Showing 5 changed files with 911 additions and 10 deletions.
34 changes: 34 additions & 0 deletions tests/TestHelpers/GraphHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2111,4 +2111,38 @@ public static function sendSharingInvitationForDrive(
\json_encode($body)
);
}

/**
* @param string $baseUrl
* @param string $xRequestId
* @param string $user
* @param string $password
* @param string $spaceId
* @param mixed $body
* @param string $permissionsId
*
* @return ResponseInterface
* @throws GuzzleException
*/
public static function updateShareOfDrive(
string $baseUrl,
string $xRequestId,
string $user,
string $password,
string $spaceId,
$body,
string $permissionsId
): ResponseInterface {
$url = self::getBetaFullUrl($baseUrl, "drives/$spaceId/root/permissions/$permissionsId");

return HttpRequestHelper::sendRequestOnce(
$url,
$xRequestId,
'PATCH',
$user,
$password,
self::getRequestHeaders(),
$body
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1837,9 +1837,14 @@ Feature: Send a sharing invitations
"type": "object",
"required": [
"grantedToV2",
"roles"
"roles",
"id"
],
"properties": {
"id": {
"type": "string",
"pattern": "^g:%groupd_id_pattern%$"
},
"grantedToV2": {
"type": "object",
"required": [
Expand Down

0 comments on commit 8b9c623

Please sign in to comment.