summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2016-12-19 10:19:15 +0100
committerGitHub <noreply@github.com>2016-12-19 10:19:15 +0100
commit9b71ee27ff95336c36d608217d9621110e6674c1 (patch)
tree9159e23779073c37460ae7ef0f3ca2604189916f
parent4f79d2ff0d0f3b4e6bcbba0ab876e19d0a17588c (diff)
parentad725de9ad29bcb6d998914fbbd2ef068ae7c822 (diff)
downloadnextcloud-server-9b71ee27ff95336c36d608217d9621110e6674c1.tar.gz
nextcloud-server-9b71ee27ff95336c36d608217d9621110e6674c1.zip
Merge pull request #2727 from nextcloud/fix-colon-issue
[downstream] Fix colon issue
m---------3rdparty0
-rw-r--r--build/integration/features/bootstrap/WebDav.php9
-rw-r--r--build/integration/features/webdav-related.feature16
3 files changed, 25 insertions, 0 deletions
diff --git a/3rdparty b/3rdparty
-Subproject f2974c2e72b2ad5ab7ae745936c4d866405d2b6
+Subproject 32f3284a5ca0e372baaf458dc22aed89e257178
diff --git a/build/integration/features/bootstrap/WebDav.php b/build/integration/features/bootstrap/WebDav.php
index 8a34d90b849..0a08e764e30 100644
--- a/build/integration/features/bootstrap/WebDav.php
+++ b/build/integration/features/bootstrap/WebDav.php
@@ -31,6 +31,7 @@
use GuzzleHttp\Client as GClient;
use GuzzleHttp\Message\ResponseInterface;
use Sabre\DAV\Client as SClient;
+use Sabre\DAV\Xml\Property\ResourceType;
require __DIR__ . '/../../vendor/autoload.php';
@@ -328,6 +329,14 @@ trait WebDav {
}
$value = $keys[$key];
+ if ($value instanceof ResourceType) {
+ $value = $value->getValue();
+ if (empty($value)) {
+ $value = '';
+ } else {
+ $value = $value[0];
+ }
+ }
if ($value != $expectedValue) {
throw new \Exception("Property \"$key\" found with value \"$value\", expected \"$expectedValue\"");
}
diff --git a/build/integration/features/webdav-related.feature b/build/integration/features/webdav-related.feature
index 658e689f54e..b75fdd35618 100644
--- a/build/integration/features/webdav-related.feature
+++ b/build/integration/features/webdav-related.feature
@@ -447,3 +447,19 @@ Feature: webdav-related
And As an "user1"
When User "user1" deletes file "/testfolder/asdf.txt"
Then the HTTP status code should be "204"
+
+ Scenario: Creating a folder
+ Given using old dav path
+ And user "user0" exists
+ And user "user0" created a folder "/test_folder"
+ When as "user0" gets properties of folder "/test_folder" with
+ |{DAV:}resourcetype|
+ Then the single response should contain a property "{DAV:}resourcetype" with value "{DAV:}collection"
+
+ Scenario: Creating a folder with special chars
+ Given using old dav path
+ And user "user0" exists
+ And user "user0" created a folder "/test_folder:5"
+ When as "user0" gets properties of folder "/test_folder:5" with
+ |{DAV:}resourcetype|
+ Then the single response should contain a property "{DAV:}resourcetype" with value "{DAV:}collection"