Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorSergio Bertolin <sbertolin@solidgear.es>2015-11-19 13:28:38 +0300
committerSergio Bertolin <sbertolin@solidgear.es>2015-11-19 15:45:13 +0300
commit81e0a3ea2211cd2d3ea9d543c2523970be17867c (patch)
treefb294de19840b7dbaa597ccbe17d79715773dd00 /build
parent630ba2fd0948b01db16b258a064bf3ca02302d1d (diff)
Added test and logic for deleting all group shares
Diffstat (limited to 'build')
-rw-r--r--build/integration/features/bootstrap/FeatureContext.php13
-rw-r--r--build/integration/features/sharing-v1.feature16
2 files changed, 27 insertions, 2 deletions
diff --git a/build/integration/features/bootstrap/FeatureContext.php b/build/integration/features/bootstrap/FeatureContext.php
index 56b81d631a7..9daebd1e165 100644
--- a/build/integration/features/bootstrap/FeatureContext.php
+++ b/build/integration/features/bootstrap/FeatureContext.php
@@ -961,8 +961,7 @@ class FeatureContext implements Context, SnippetAcceptingContext {
/**
* @Then /^last share_id is included in the answer$/
*/
- public function findingLastShareID(){
- print_r($this->response->xml());
+ public function checkingLastShareIDIsIncluded(){
$share_id = $this->lastShareData->data[0]->id;
if (!$this->isFieldInResponse('id', $share_id)){
PHPUnit_Framework_Assert::fail("Share id $share_id not found in response");
@@ -970,6 +969,16 @@ class FeatureContext implements Context, SnippetAcceptingContext {
}
/**
+ * @Then /^last share_id is not included in the answer$/
+ */
+ public function checkingLastShareIDIsNotIncluded(){
+ $share_id = $this->lastShareData->data[0]->id;
+ if ($this->isFieldInResponse('id', $share_id)){
+ PHPUnit_Framework_Assert::fail("Share id $share_id has been found in response");
+ }
+ }
+
+ /**
* @Then /^Share fields of last share match with$/
* @param \Behat\Gherkin\Node\TableNode|null $formData
*/
diff --git a/build/integration/features/sharing-v1.feature b/build/integration/features/sharing-v1.feature
index 0100ab3eda1..6f62793f8df 100644
--- a/build/integration/features/sharing-v1.feature
+++ b/build/integration/features/sharing-v1.feature
@@ -312,6 +312,22 @@ Feature: sharing
And the HTTP status code should be "200"
And last share_id is included in the answer
+ Scenario: Delete all group shares
+ Given As an "admin"
+ And user "user0" exists
+ And user "user1" exists
+ And group "group1" exists
+ And user "user1" belongs to group "group1"
+ And file "textfile0.txt" from user "user0" is shared with group "group1"
+ And User "user1" moved file "/textfile0.txt" to "/FOLDER/textfile0.txt"
+ And As an "user0"
+ And Deleting last share
+ And As an "user1"
+ When sending "GET" to "/apps/files_sharing/api/v1/shares?shared_with_me=true"
+ Then the OCS status code should be "100"
+ And the HTTP status code should be "200"
+ And last share_id is not included in the answer
+
Scenario: delete a share
Given user "user0" exists
And user "user1" exists