Refactor test for updating the share (#5789)

This commit is contained in:
Swikriti Tripathi
2023-03-11 12:47:31 +05:45
committed by GitHub
parent 94c3df2246
commit b445f847e8
2 changed files with 2 additions and 9 deletions

View File

@@ -2376,7 +2376,7 @@ trait Sharing {
}
/**
* @When the information about the last share for user :user should include
* @Then the information about the last share for user :user should include
*
* @param string $user
* @param TableNode $table

View File

@@ -2015,13 +2015,6 @@ class SpacesContext implements Context {
): void {
$shareId = $this->featureContext->getLastPublicLinkShareId();
$rows = $table->getRowsHash();
$rows["role"] = \array_key_exists("role", $rows) ? $rows["role"] : 'viewer';
$rows["expireDate"] = \array_key_exists("expireDate", $rows) ? $rows["expireDate"] : null;
$body = [
"expireDate" => $rows["expireDate"],
];
$fullUrl = $this->baseUrl . $this->ocsApiUrl . '/' . $shareId;
$this->featureContext->setResponse(
HttpRequestHelper::sendRequest(
@@ -2031,7 +2024,7 @@ class SpacesContext implements Context {
$this->featureContext->getActualUsername($user),
$this->featureContext->getPasswordForUser($user),
null,
$body
$rows
)
);
}