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/apps
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-08-19 16:43:10 +0300
committerJoas Schilling <coding@schilljs.com>2020-08-19 16:43:10 +0300
commitdc8feeb26048b86d123757efce7cbb2c4dd38f00 (patch)
tree5719b8496b66717bf8e16efd22d6e84f55eb2ba4 /apps
parent818917c3fa04538caaed4e4906684b915801cb29 (diff)
Fix broken backport
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/Upload/ChunkingPlugin.php1
-rw-r--r--apps/dav/tests/unit/Upload/ChunkingPluginTest.php10
2 files changed, 8 insertions, 3 deletions
diff --git a/apps/dav/lib/Upload/ChunkingPlugin.php b/apps/dav/lib/Upload/ChunkingPlugin.php
index 631111ad128..1e6375fd8e5 100644
--- a/apps/dav/lib/Upload/ChunkingPlugin.php
+++ b/apps/dav/lib/Upload/ChunkingPlugin.php
@@ -23,6 +23,7 @@
namespace OCA\DAV\Upload;
+use OCA\DAV\Connector\Sabre\Exception\Forbidden;
use Sabre\DAV\Exception\BadRequest;
use Sabre\DAV\Server;
use Sabre\DAV\ServerPlugin;
diff --git a/apps/dav/tests/unit/Upload/ChunkingPluginTest.php b/apps/dav/tests/unit/Upload/ChunkingPluginTest.php
index bdce22c1591..c3708bce974 100644
--- a/apps/dav/tests/unit/Upload/ChunkingPluginTest.php
+++ b/apps/dav/tests/unit/Upload/ChunkingPluginTest.php
@@ -101,8 +101,12 @@ class ChunkingPluginTest extends TestCase {
->method('nodeExists')
->with('target')
->will($this->returnValue(false));
- $this->response->expects($this->never())
- ->method('setStatus');
+ $this->response->expects($this->once())
+ ->method('setHeader')
+ ->with('Content-Length', '0');
+ $this->response->expects($this->once())
+ ->method('setStatus')
+ ->with(201);
$this->request->expects($this->once())
->method('getHeader')
->with('OC-Total-Length')
@@ -143,7 +147,7 @@ class ChunkingPluginTest extends TestCase {
$this->assertFalse($this->plugin->beforeMove('source', 'target'));
}
-
+
public function testBeforeMoveSizeIsWrong() {
$this->expectException(\Sabre\DAV\Exception\BadRequest::class);
$this->expectExceptionMessage('Chunks on server do not sum up to 4 but to 3 bytes');