Commit 0dd0adf6 authored by Roeland Jago Douma's avatar Roeland Jago Douma Committed by Thomas Müller
Browse files

Intergration tests

parent ffce4fc6
......@@ -17,6 +17,9 @@ trait Sharing{
/** @var SimpleXMLElement */
private $lastShareData = null;
/** @var int */
private $savedShareId = null;
/**
* @When /^creating a share with$/
* @param \Behat\Gherkin\Node\TableNode|null $formData
......@@ -414,5 +417,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');
}
}
}
......@@ -547,3 +547,15 @@ Feature: sharing
When Updating last share with
| permissions | 31 |
Then the OCS status code should be "404"
Scenario: Only allow 1 link share per file/folder
Given user "user0" exists
And As an "user0"
And creating a share with
| path | welcome.txt |
| shareType | 3 |
When save last share id
And creating a share with
| path | welcome.txt |
| shareType | 3 |
Then share ids should match
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment