summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorSergio Bertolin <sbertolin@solidgear.es>2015-11-19 14:17:56 +0000
committerSergio Bertolin <sbertolin@solidgear.es>2015-11-19 14:17:56 +0000
commitee4a18a16cd964338b417b0a312a6a67c54e7f53 (patch)
tree5fd610f12a4ceebb4123e0f966062596f75ce621 /build
parent81e0a3ea2211cd2d3ea9d543c2523970be17867c (diff)
downloadnextcloud-server-ee4a18a16cd964338b417b0a312a6a67c54e7f53.tar.gz
nextcloud-server-ee4a18a16cd964338b417b0a312a6a67c54e7f53.zip
added test about resharing
Diffstat (limited to 'build')
-rw-r--r--build/integration/features/bootstrap/FeatureContext.php4
-rw-r--r--build/integration/features/sharing-v1.feature37
2 files changed, 31 insertions, 10 deletions
diff --git a/build/integration/features/bootstrap/FeatureContext.php b/build/integration/features/bootstrap/FeatureContext.php
index 9daebd1e165..329b18d151c 100644
--- a/build/integration/features/bootstrap/FeatureContext.php
+++ b/build/integration/features/bootstrap/FeatureContext.php
@@ -599,10 +599,10 @@ class FeatureContext implements Context, SnippetAcceptingContext {
}
/**
- * @When /^creating a public share with$/
+ * @When /^creating a share with$/
* @param \Behat\Gherkin\Node\TableNode|null $formData
*/
- public function createPublicShare($body) {
+ public function creatingShare($body) {
$fullUrl = $this->baseUrl . "v{$this->apiVersion}.php/apps/files_sharing/api/v1/shares";
$client = new Client();
$options = [];
diff --git a/build/integration/features/sharing-v1.feature b/build/integration/features/sharing-v1.feature
index 6f62793f8df..0d64fcd8bcb 100644
--- a/build/integration/features/sharing-v1.feature
+++ b/build/integration/features/sharing-v1.feature
@@ -28,7 +28,7 @@ Feature: sharing
Scenario: Creating a new public share
Given user "user0" exists
And As an "user0"
- When creating a public share with
+ When creating a share with
| path | welcome.txt |
| shareType | 3 |
Then the OCS status code should be "100"
@@ -38,7 +38,7 @@ Feature: sharing
Scenario: Creating a new public share with password
Given user "user0" exists
And As an "user0"
- When creating a public share with
+ When creating a share with
| path | welcome.txt |
| shareType | 3 |
| password | publicpw |
@@ -49,7 +49,7 @@ Feature: sharing
Scenario: Creating a new public share of a folder
Given user "user0" exists
And As an "user0"
- When creating a public share with
+ When creating a share with
| path | FOLDER |
| shareType | 3 |
| password | publicpw |
@@ -68,7 +68,7 @@ Feature: sharing
Scenario: Creating a new public share with password and adding an expiration date
Given user "user0" exists
And As an "user0"
- When creating a public share with
+ When creating a share with
| path | welcome.txt |
| shareType | 3 |
| password | publicpw |
@@ -81,7 +81,7 @@ Feature: sharing
Scenario: Creating a new public share, updating its expiration date and getting its info
Given user "user0" exists
And As an "user0"
- When creating a public share with
+ When creating a share with
| path | FOLDER |
| shareType | 3 |
And Updating last share with
@@ -111,7 +111,7 @@ Feature: sharing
Scenario: Creating a new public share, updating its password and getting its info
Given user "user0" exists
And As an "user0"
- When creating a public share with
+ When creating a share with
| path | FOLDER |
| shareType | 3 |
And Updating last share with
@@ -140,7 +140,7 @@ Feature: sharing
Scenario: Creating a new public share, updating its permissions and getting its info
Given user "user0" exists
And As an "user0"
- When creating a public share with
+ When creating a share with
| path | FOLDER |
| shareType | 3 |
And Updating last share with
@@ -169,7 +169,7 @@ Feature: sharing
Scenario: Creating a new public share, updating publicUpload option and getting its info
Given user "user0" exists
And As an "user0"
- When creating a public share with
+ When creating a share with
| path | FOLDER |
| shareType | 3 |
And Updating last share with
@@ -312,6 +312,27 @@ Feature: sharing
And the HTTP status code should be "200"
And last share_id is included in the answer
+ Scenario: User is not allowed to reshare file
+ As an "admin"
+ Given user "user0" exists
+ And user "user1" exists
+ And user "user2" exists
+ And As an "user0"
+ And creating a share with
+ | path | /textfile0.txt |
+ | shareType | 0 |
+ | shareWith | user1 |
+ | permissions | 8 |
+ And As an "user1"
+ When creating a share with
+ | path | /textfile0. (2).txt |
+ | shareType | 0 |
+ | shareWith | user2 |
+ | permissions | 31 |
+ Then the OCS status code should be "404"
+ And the HTTP status code should be "200"
+
+
Scenario: Delete all group shares
Given As an "admin"
And user "user0" exists