diff options
author | Vincent Petry <vincent@nextcloud.com> | 2021-08-27 17:56:16 +0200 |
---|---|---|
committer | Vincent Petry <vincent@nextcloud.com> | 2021-08-27 17:56:16 +0200 |
commit | 5b664e02d8179608541cce97a2343eea36aec4f7 (patch) | |
tree | 9b2698d98b1617bb1be1360420e27dc19890e3a8 /build/integration/features/bootstrap | |
parent | 1f42657bb9ea76353fbc02ee100cff5755b6384d (diff) | |
download | nextcloud-server-5b664e02d8179608541cce97a2343eea36aec4f7.tar.gz nextcloud-server-5b664e02d8179608541cce97a2343eea36aec4f7.zip |
Test for transfer ownership with incoming shares
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'build/integration/features/bootstrap')
-rw-r--r-- | build/integration/features/bootstrap/CommandLineContext.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/build/integration/features/bootstrap/CommandLineContext.php b/build/integration/features/bootstrap/CommandLineContext.php index b435aaceca0..41756e448bf 100644 --- a/build/integration/features/bootstrap/CommandLineContext.php +++ b/build/integration/features/bootstrap/CommandLineContext.php @@ -97,7 +97,7 @@ class CommandLineContext implements \Behat\Behat\Context\Context { } /** - * @When /^transferring ownership from "([^"]+)" to "([^"]+)"/ + * @When /^transferring ownership from "([^"]+)" to "([^"]+)"$/ */ public function transferringOwnership($user1, $user2) { if ($this->runOcc(['files:transfer-ownership', $user1, $user2]) === 0) { @@ -109,7 +109,7 @@ class CommandLineContext implements \Behat\Behat\Context\Context { } /** - * @When /^transferring ownership of path "([^"]+)" from "([^"]+)" to "([^"]+)"/ + * @When /^transferring ownership of path "([^"]+)" from "([^"]+)" to "([^"]+)"$/ */ public function transferringOwnershipPath($path, $user1, $user2) { $path = '--path=' . $path; @@ -121,6 +121,18 @@ class CommandLineContext implements \Behat\Behat\Context\Context { } } + /** + * @When /^transferring ownership of path "([^"]+)" from "([^"]+)" to "([^"]+)" with received shares$/ + */ + public function transferringOwnershipPathWithIncomingShares($path, $user1, $user2) { + $path = '--path=' . $path; + if ($this->runOcc(['files:transfer-ownership', $path, $user1, $user2, '--transfer-incoming-shares=1']) === 0) { + $this->lastTransferPath = $this->findLastTransferFolderForUser($user1, $user2); + } else { + // failure + $this->lastTransferPath = null; + } + } /** * @When /^using received transfer folder of "([^"]+)" as dav path$/ |