diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-08-13 20:47:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-13 20:47:08 +0200 |
commit | e9f5c7f649b923ec45d7a37eb24369e11727ccbf (patch) | |
tree | e978e971c21d7f5509178c6053ff201f3f4aea31 /apps/dav/tests/unit | |
parent | ed461155930219c2de3a648e7dfdf75778af2f7a (diff) | |
parent | 6722246aca71e392ab54600a3c91750075a595f2 (diff) | |
download | nextcloud-server-e9f5c7f649b923ec45d7a37eb24369e11727ccbf.tar.gz nextcloud-server-e9f5c7f649b923ec45d7a37eb24369e11727ccbf.zip |
Merge pull request #22128 from nextcloud/bugfix/noid/cleanup-chunks-on-failure
Delete chunks if the move on an upload failed
Diffstat (limited to 'apps/dav/tests/unit')
-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 465bdf58eda..6391bc0a8e5 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(201); $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() { |