diff options
author | Julius Härtl <jus@bitgrid.net> | 2020-08-12 09:18:35 +0300 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2020-08-13 21:55:06 +0300 |
commit | b83c858e6d9636f8181986d2de17e671348fc1f9 (patch) | |
tree | 0fa66ab711ba4f798774cf3476b4ff2e07ebc0f7 /apps/dav/tests | |
parent | 242b19f18e6ad6c7dbd2c06e10f3e2b00ad5460b (diff) |
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.php | 10 |
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() { |