aboutsummaryrefslogtreecommitdiffstats
path: root/build/integration/features/bootstrap
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-03-01 09:22:39 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-03-01 09:22:39 +0100
commit1652541150f4e8d4c8bb147c81238780cf888e45 (patch)
treed785ef573af12e9b0dd222e98c87eeda98abd50d /build/integration/features/bootstrap
parent25a4571dcd54b9db082ca9b2aa70924b4dc6f18d (diff)
parent0dd0adf69f4f507551389b147985f92c9d922d43 (diff)
downloadnextcloud-server-1652541150f4e8d4c8bb147c81238780cf888e45.tar.gz
nextcloud-server-1652541150f4e8d4c8bb147c81238780cf888e45.zip
Merge pull request #22700 from owncloud/only_1_linkshare
For now only allow 1 link share per file/folder
Diffstat (limited to 'build/integration/features/bootstrap')
-rw-r--r--build/integration/features/bootstrap/Sharing.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/build/integration/features/bootstrap/Sharing.php b/build/integration/features/bootstrap/Sharing.php
index ec270ef05ce..da2e9ca1094 100644
--- a/build/integration/features/bootstrap/Sharing.php
+++ b/build/integration/features/bootstrap/Sharing.php
@@ -17,6 +17,9 @@ trait Sharing{
/** @var SimpleXMLElement */
private $lastShareData = null;
+ /** @var int */
+ private $savedShareId = null;
+
/**
* @Given /^as "([^"]*)" creating a share with$/
* @param \Behat\Gherkin\Node\TableNode|null $formData
@@ -422,5 +425,22 @@ trait Sharing{
}
}
+ /**
+ * @When save last share id
+ */
+ public function saveLastShareId()
+ {
+ $this->savedShareId = $this->lastShareData['data']['id'];
+ }
+
+ /**
+ * @Then share ids should match
+ */
+ public function shareIdsShouldMatch()
+ {
+ if ($this->savedShareId !== $this->lastShareData['data']['id']) {
+ throw new \Excetion('Expected the same link share to be returned');
+ }
+ }
}