Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorSergio Bertolin <sbertolin@solidgear.es>2016-09-26 15:10:24 +0300
committerSergio Bertolin <sbertolin@solidgear.es>2016-11-15 12:24:12 +0300
commit9dd216a0fba5a900f81877be9b1f9fd01ff70c27 (patch)
tree31e6a8e23bcf3ba4a54f23c45b8ada44aeffc0f4 /build
parent7f4dbaeffbf2ad061a0194db2dab54bac3dbd368 (diff)
Added quota calculation test when a file is recieved
Diffstat (limited to 'build')
-rw-r--r--build/integration/features/bootstrap/BasicStructure.php2
-rw-r--r--build/integration/features/bootstrap/WebDav.php3
-rw-r--r--build/integration/features/webdav-related.feature12
3 files changed, 15 insertions, 2 deletions
diff --git a/build/integration/features/bootstrap/BasicStructure.php b/build/integration/features/bootstrap/BasicStructure.php
index bff2f5851bb..13697a4123c 100644
--- a/build/integration/features/bootstrap/BasicStructure.php
+++ b/build/integration/features/bootstrap/BasicStructure.php
@@ -279,7 +279,7 @@ trait BasicStructure {
$this->theHTTPStatusCodeShouldBe('200');
}
- public function createFileSpecificSize($user, $name, $size){
+ public function createFileSpecificSize($name, $size){
$file = fopen("data/" . "$name", 'w');
fseek($file, $size - 1 ,SEEK_CUR);
fwrite($file,'a'); // write a dummy char at SIZE position
diff --git a/build/integration/features/bootstrap/WebDav.php b/build/integration/features/bootstrap/WebDav.php
index 9a8287a9ba6..ffaea67d200 100644
--- a/build/integration/features/bootstrap/WebDav.php
+++ b/build/integration/features/bootstrap/WebDav.php
@@ -408,10 +408,11 @@ trait WebDav {
*/
public function userAddsAFileTo($user, $bytes, $destination){
$filename = "filespecificSize.txt";
- $this->createFileSpecificSize($user, $filename, $bytes);
+ $this->createFileSpecificSize($filename, $bytes);
PHPUnit_Framework_Assert::assertEquals(1, file_exists("data/$filename"));
$this->userUploadsAFileTo($user, "data/$filename", $destination);
$this->removeFile("data/", $filename);
+ PHPUnit_Framework_Assert::assertEquals(1, file_exists("../../data/$user/files$destination"));
}
/**
diff --git a/build/integration/features/webdav-related.feature b/build/integration/features/webdav-related.feature
index 0c45a673018..de9941976fb 100644
--- a/build/integration/features/webdav-related.feature
+++ b/build/integration/features/webdav-related.feature
@@ -188,6 +188,18 @@ Feature: webdav-related
|{DAV:}quota-available-bytes|
Then the single response should contain a property "{DAV:}quota-available-bytes" with value "600"
+ Scenario: Retrieving folder quota when quota is set and a file was recieved
+ Given using dav path "remote.php/webdav"
+ And As an "admin"
+ And user "user0" exists
+ And user "user1" exists
+ And user "user1" has a quota of "1 KB"
+ And user "user0" adds a file of 93 bytes to "/user0.txt"
+ And file "user0.txt" of user "user0" is shared with user "user1"
+ When as "user1" gets properties of folder "/" with
+ |{DAV:}quota-available-bytes|
+ Then the single response should contain a property "{DAV:}quota-available-bytes" with value "693"
+
Scenario: download a public shared file with range
Given user "user0" exists
And As an "user0"