diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2021-01-22 14:34:02 +0100 |
---|---|---|
committer | Vincent Petry <vincent@nextcloud.com> | 2021-11-05 09:48:49 +0100 |
commit | 66b5a2d56afd1d84117b99e468ec7788c44d21b1 (patch) | |
tree | e88cf36a06c750d47f390a970608d39154ccb08f /build/integration/features/bootstrap/FederationContext.php | |
parent | ec4474c459c296c8fd87aa16a0399b4fb9ab0a92 (diff) | |
download | nextcloud-server-66b5a2d56afd1d84117b99e468ec7788c44d21b1.tar.gz nextcloud-server-66b5a2d56afd1d84117b99e468ec7788c44d21b1.zip |
Add integration tests for deleting federated shares
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'build/integration/features/bootstrap/FederationContext.php')
-rw-r--r-- | build/integration/features/bootstrap/FederationContext.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/build/integration/features/bootstrap/FederationContext.php b/build/integration/features/bootstrap/FederationContext.php index 2754cf668e6..d859afc610f 100644 --- a/build/integration/features/bootstrap/FederationContext.php +++ b/build/integration/features/bootstrap/FederationContext.php @@ -39,6 +39,9 @@ class FederationContext implements Context, SnippetAcceptingContext { use AppConfiguration; use CommandLine; + /** @var string */ + private $lastAcceptedRemoteShareId; + /** * @BeforeScenario */ @@ -109,6 +112,17 @@ class FederationContext implements Context, SnippetAcceptingContext { $this->theHTTPStatusCodeShouldBe('200'); $this->theOCSStatusCodeShouldBe('100'); $this->usingServer($previous); + + $this->lastAcceptedRemoteShareId = $share_id; + } + + /** + * @When /^user "([^"]*)" deletes last accepted remote share$/ + * @param string $user + */ + public function deleteLastAcceptedRemoteShare($user) { + $this->asAn($user); + $this->sendingToWith('DELETE', "/apps/files_sharing/api/v1/remote_shares/" . $this->lastAcceptedRemoteShareId, null); } protected function resetAppConfigs() { |