aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/tests
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-08-12 08:18:35 +0200
committerJulius Härtl <jus@bitgrid.net>2020-08-12 08:18:46 +0200
commitcda5cfc01ea93244dbb1ea93a207d0933b6ba6db (patch)
tree7e7fd686121675b20e69ee6df28cde12a6710a78 /apps/dav/tests
parent860f6d8fcf50d8d7028ee503d00eef42472ae9e2 (diff)
downloadnextcloud-server-cda5cfc01ea93244dbb1ea93a207d0933b6ba6db.tar.gz
nextcloud-server-cda5cfc01ea93244dbb1ea93a207d0933b6ba6db.zip
Adjust chunking test for non-existing target node
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/dav/tests')
-rw-r--r--apps/dav/tests/unit/Upload/ChunkingPluginTest.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/dav/tests/unit/Upload/ChunkingPluginTest.php b/apps/dav/tests/unit/Upload/ChunkingPluginTest.php
index 27d6cbf7e85..d81c1eaf504 100644
--- a/apps/dav/tests/unit/Upload/ChunkingPluginTest.php
+++ b/apps/dav/tests/unit/Upload/ChunkingPluginTest.php
@@ -128,14 +128,18 @@ class ChunkingPluginTest extends TestCase {
->method('nodeExists')
->with('target')
->willReturn(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(204);
$this->request->expects($this->once())
->method('getHeader')
->with('OC-Total-Length')
->willReturn(4);
- $this->assertNull($this->plugin->beforeMove('source', 'target'));
+ $this->assertFalse($this->plugin->beforeMove('source', 'target'));
}
public function testBeforeMoveFutureFileMoveIt() {