diff options
author | Sergio Bertolin <sbertolin@solidgear.es> | 2015-12-03 09:46:00 +0000 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-12-03 10:58:31 +0100 |
commit | b17553d921b7e6d41f25e6007c782569e910d6b2 (patch) | |
tree | 3425fc8c186e8940495afcc7dbd40c2605561578 /build/integration/features/bootstrap | |
parent | 7fefd4f4d900de85201dafd9848f1212d4f6176d (diff) | |
download | nextcloud-server-b17553d921b7e6d41f25e6007c782569e910d6b2.tar.gz nextcloud-server-b17553d921b7e6d41f25e6007c782569e910d6b2.zip |
Added test case about downloading by range a public shared file
Diffstat (limited to 'build/integration/features/bootstrap')
-rw-r--r-- | build/integration/features/bootstrap/WebDav.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/build/integration/features/bootstrap/WebDav.php b/build/integration/features/bootstrap/WebDav.php index 8f0f30b377a..a682467f52d 100644 --- a/build/integration/features/bootstrap/WebDav.php +++ b/build/integration/features/bootstrap/WebDav.php @@ -73,6 +73,24 @@ trait WebDav{ } /** + * @When /^Downloading last public shared file with range "([^"]*)"$/ + */ + public function downloadPublicFileWithRange($range){ + $token = $this->lastShareData->data->token; + $fullUrl = substr($this->baseUrl, 0, -4) . "public.php/webdav"; + $headers['Range'] = $range; + + $client = new GClient(); + $options = []; + $options['auth'] = [$token, ""]; + + $request = $client->createRequest("GET", $fullUrl, $options); + $request->addHeader('Range', $range); + + $this->response = $client->send($request); + } + + /** * @Then /^Downloaded content should be "([^"]*)"$/ */ public function downloadedContentShouldBe($content){ |