[tests-only][full-ci]Added tests for setting password in a public share link (#8079)

* Added tests for set/update for password for public link

* Added assertion step for password update

* Rebase and refactor setPassword step

Signed-off-by: sagargurung1001@gmail.com <sagargurung1001@gmail.com>

* Review Address

* Review Address

---------

Signed-off-by: sagargurung1001@gmail.com <sagargurung1001@gmail.com>
This commit is contained in:
Sagar Gurung
2024-01-05 13:57:59 +05:45
committed by GitHub
parent dece995e29
commit c46db2b7cb
6 changed files with 230 additions and 15 deletions

View File

@@ -1701,4 +1701,38 @@ class GraphHelper {
$body
);
}
/**
* @param string $baseUrl
* @param string $xRequestId
* @param string $user
* @param string $password
* @param string $spaceId
* @param string $itemId
* @param mixed $body
* @param string $shareId
*
* @return ResponseInterface
* @throws GuzzleException
*/
public static function setLinkSharePassword(
string $baseUrl,
string $xRequestId,
string $user,
string $password,
string $spaceId,
string $itemId,
$body,
string $shareId
): ResponseInterface {
$url = self::getBetaFullUrl($baseUrl, "drives/$spaceId/items/$itemId/permissions/$shareId/setPassword");
return HttpRequestHelper::post(
$url,
$xRequestId,
$user,
$password,
self::getRequestHeaders(),
$body
);
}
}