summaryrefslogtreecommitdiffstats
path: root/build/integration/features
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-07-07 11:29:46 +0200
committerMorris Jobke <hey@morrisjobke.de>2016-07-07 11:29:46 +0200
commitba16fd0d337fa26114f55086198979d147a298c1 (patch)
tree39111cec77d17d5eeb60bd1b609e7a8419310459 /build/integration/features
parent5ace43f43895cba4b398367e10731f92450d7da2 (diff)
parented28885d73181e61c06802639910014e8a265e42 (diff)
downloadnextcloud-server-ba16fd0d337fa26114f55086198979d147a298c1.tar.gz
nextcloud-server-ba16fd0d337fa26114f55086198979d147a298c1.zip
Merge branch 'master' into sync-master
Diffstat (limited to 'build/integration/features')
-rw-r--r--build/integration/features/bootstrap/WebDav.php18
-rw-r--r--build/integration/features/provisioning-v1.feature2
-rw-r--r--build/integration/features/webdav-related.feature29
3 files changed, 49 insertions, 0 deletions
diff --git a/build/integration/features/bootstrap/WebDav.php b/build/integration/features/bootstrap/WebDav.php
index 0abb8667739..23f80c2fa76 100644
--- a/build/integration/features/bootstrap/WebDav.php
+++ b/build/integration/features/bootstrap/WebDav.php
@@ -42,6 +42,7 @@ trait WebDav {
$request->setBody($body);
}
+
return $client->send($request);
}
@@ -71,6 +72,23 @@ trait WebDav {
}
/**
+ * @When /^User "([^"]*)" copies file "([^"]*)" to "([^"]*)"$/
+ * @param string $user
+ * @param string $fileSource
+ * @param string $fileDestination
+ */
+ public function userCopiesFileTo($user, $fileSource, $fileDestination) {
+ $fullUrl = substr($this->baseUrl, 0, -4) . $this->davPath;
+ $headers['Destination'] = $fullUrl . $fileDestination;
+ try {
+ $this->response = $this->makeDavRequest($user, 'COPY', $fileSource, $headers);
+ } catch (\GuzzleHttp\Exception\ClientException $e) {
+ // 4xx and 5xx responses cause an exception
+ $this->response = $e->getResponse();
+ }
+ }
+
+ /**
* @When /^Downloading file "([^"]*)" with range "([^"]*)"$/
* @param string $fileSource
* @param string $range
diff --git a/build/integration/features/provisioning-v1.feature b/build/integration/features/provisioning-v1.feature
index d44903c2743..135c67dc3a6 100644
--- a/build/integration/features/provisioning-v1.feature
+++ b/build/integration/features/provisioning-v1.feature
@@ -282,6 +282,7 @@ Feature: provisioning
Then the OCS status code should be "100"
And the HTTP status code should be "200"
And apps returned are
+ | admin_audit |
| comments |
| dav |
| federatedfilesharing |
@@ -292,6 +293,7 @@ Feature: provisioning
| files_versions |
| provisioning_api |
| systemtags |
+ | theming |
| updatenotification |
Scenario: get app info
diff --git a/build/integration/features/webdav-related.feature b/build/integration/features/webdav-related.feature
index 06df280ea64..a135f077f71 100644
--- a/build/integration/features/webdav-related.feature
+++ b/build/integration/features/webdav-related.feature
@@ -257,3 +257,32 @@ Feature: webdav-related
When Downloading file "/welcome.txt" as "userToBeDisabled"
Then the HTTP status code should be "503"
+ Scenario: Copying files into a folder with edit permissions
+ Given using dav path "remote.php/webdav"
+ And user "user0" exists
+ And user "user1" exists
+ And As an "user1"
+ And user "user1" created a folder "/testcopypermissionsAllowed"
+ And as "user1" creating a share with
+ | path | testcopypermissionsAllowed |
+ | shareType | 0 |
+ | permissions | 31 |
+ | shareWith | user0 |
+ And User "user0" uploads file with content "copytest" to "/copytest.txt"
+ When User "user0" copies file "/copytest.txt" to "/testcopypermissionsAllowed/copytest.txt"
+ Then the HTTP status code should be "201"
+
+ Scenario: Copying files into a folder without edit permissions
+ Given using dav path "remote.php/webdav"
+ And user "user0" exists
+ And user "user1" exists
+ And As an "user1"
+ And user "user1" created a folder "/testcopypermissionsNotAllowed"
+ And as "user1" creating a share with
+ | path | testcopypermissionsNotAllowed |
+ | shareType | 0 |
+ | permissions | 1 |
+ | shareWith | user0 |
+ And User "user0" uploads file with content "copytest" to "/copytest.txt"
+ When User "user0" copies file "/copytest.txt" to "/testcopypermissionsNotAllowed/copytest.txt"
+ Then the HTTP status code should be "403"