diff options
author | Sergio Bertolin <sbertolin@solidgear.es> | 2015-11-20 11:26:52 +0000 |
---|---|---|
committer | Sergio Bertolin <sbertolin@solidgear.es> | 2015-11-20 11:26:52 +0000 |
commit | a2938385f9f5d585eacdbe15791b913614c94f9d (patch) | |
tree | 1636f3b040628635cedd3a6829088561a4f7955e /build | |
parent | dd10e1d538e91bdebad0c250a62d06afe9d74b55 (diff) | |
download | nextcloud-server-a2938385f9f5d585eacdbe15791b913614c94f9d.tar.gz nextcloud-server-a2938385f9f5d585eacdbe15791b913614c94f9d.zip |
Making webdav path configurable
Diffstat (limited to 'build')
-rw-r--r-- | build/integration/features/bootstrap/FeatureContext.php | 16 | ||||
-rw-r--r-- | build/integration/features/sharing-v1.feature | 1 | ||||
-rw-r--r-- | build/integration/features/webdav-related.feature | 15 |
3 files changed, 23 insertions, 9 deletions
diff --git a/build/integration/features/bootstrap/FeatureContext.php b/build/integration/features/bootstrap/FeatureContext.php index 3a4b619fe7a..b3d928bb21d 100644 --- a/build/integration/features/bootstrap/FeatureContext.php +++ b/build/integration/features/bootstrap/FeatureContext.php @@ -27,6 +27,9 @@ class FeatureContext implements Context, SnippetAcceptingContext { /** @var int */ private $sharingApiVersion = 1; + /** @var string*/ + private $davPath = "remote.php/webdav"; + /** @var SimpleXMLElement */ private $lastShareData = null; @@ -212,6 +215,13 @@ class FeatureContext implements Context, SnippetAcceptingContext { } /** + * @Given /^using dav path "([^"]*)"$/ + */ + public function usingDavPath($davPath) { + $this->davPath = $davPath; + } + + /** * @Given /^user "([^"]*)" exists$/ */ public function assureUserExists($user) { @@ -906,7 +916,7 @@ class FeatureContext implements Context, SnippetAcceptingContext { } public function makeDavRequest($user, $method, $path, $headers){ - $fullUrl = substr($this->baseUrl, 0, -4) . "remote.php/webdav" . "$path"; + $fullUrl = substr($this->baseUrl, 0, -4) . $this->davPath . "$path"; $client = new Client(); $options = []; if ($user === 'admin') { @@ -926,7 +936,7 @@ class FeatureContext implements Context, SnippetAcceptingContext { * @Given /^User "([^"]*)" moved file "([^"]*)" to "([^"]*)"$/ */ public function userMovedFile($user, $fileSource, $fileDestination){ - $fullUrl = substr($this->baseUrl, 0, -4) . "remote.php/webdav"; + $fullUrl = substr($this->baseUrl, 0, -4) . $this->davPath; $headers['Destination'] = $fullUrl . $fileDestination; $this->response = $this->makeDavRequest($user, "MOVE", $fileSource, $headers); PHPUnit_Framework_Assert::assertEquals(201, $this->response->getStatusCode()); @@ -936,7 +946,7 @@ class FeatureContext implements Context, SnippetAcceptingContext { * @When /^User "([^"]*)" moves file "([^"]*)" to "([^"]*)"$/ */ public function userMovesFile($user, $fileSource, $fileDestination){ - $fullUrl = substr($this->baseUrl, 0, -4) . "remote.php/webdav"; + $fullUrl = substr($this->baseUrl, 0, -4) . $this->davPath; $headers['Destination'] = $fullUrl . $fileDestination; $this->response = $this->makeDavRequest($user, "MOVE", $fileSource, $headers); } diff --git a/build/integration/features/sharing-v1.feature b/build/integration/features/sharing-v1.feature index 0d64fcd8bcb..33085866bf4 100644 --- a/build/integration/features/sharing-v1.feature +++ b/build/integration/features/sharing-v1.feature @@ -1,6 +1,7 @@ Feature: sharing Background: Given using api version "1" + Given using dav path "remote.php/webdav" Scenario: Creating a new share with user Given user "user0" exists diff --git a/build/integration/features/webdav-related.feature b/build/integration/features/webdav-related.feature index 450065ded2d..27d354644d0 100644 --- a/build/integration/features/webdav-related.feature +++ b/build/integration/features/webdav-related.feature @@ -1,12 +1,15 @@ Feature: sharing Background: - Given using api version "1" + Given using api version "1" + + Scenario: moving a file old way + Given using dav path "remote.php/webdav" + And As an "admin" + And user "user0" exists + When User "user0" moves file "/textfile0.txt" to "/FOLDER/textfile0.txt" + Then the HTTP status code should be "201" + - Scenario: moving a file - Given As an "admin" - And user "user0" exists - When User "user0" moves file "/textfile0.txt" to "/FOLDER/textfile0.txt" - Then the HTTP status code should be "201" |