From b445f847e862f8083ea2af36c7efd62c86732503 Mon Sep 17 00:00:00 2001 From: Swikriti Tripathi <41103328+SwikritiT@users.noreply.github.com> Date: Sat, 11 Mar 2023 12:47:31 +0545 Subject: [PATCH] Refactor test for updating the share (#5789) --- tests/acceptance/features/bootstrap/Sharing.php | 2 +- tests/acceptance/features/bootstrap/SpacesContext.php | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/tests/acceptance/features/bootstrap/Sharing.php b/tests/acceptance/features/bootstrap/Sharing.php index b5db9a36b..f5e26be58 100644 --- a/tests/acceptance/features/bootstrap/Sharing.php +++ b/tests/acceptance/features/bootstrap/Sharing.php @@ -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 diff --git a/tests/acceptance/features/bootstrap/SpacesContext.php b/tests/acceptance/features/bootstrap/SpacesContext.php index 23bd221c4..7caa116f8 100644 --- a/tests/acceptance/features/bootstrap/SpacesContext.php +++ b/tests/acceptance/features/bootstrap/SpacesContext.php @@ -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 ) ); }