Skip to content

Commit cda5cfc

Browse files
committed
Adjust chunking test for non-existing target node
Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 parent 860f6d8 commit cda5cfc

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

apps/dav/tests/unit/Upload/ChunkingPluginTest.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,18 @@ public function testBeforeMoveFutureFileSkipNonExisting() {
128128
->method('nodeExists')
129129
->with('target')
130130
->willReturn(false);
131-
$this->response->expects($this->never())
132-
->method('setStatus');
131+
$this->response->expects($this->once())
132+
->method('setHeader')
133+
->with('Content-Length', '0');
134+
$this->response->expects($this->once())
135+
->method('setStatus')
136+
->with(204);
133137
$this->request->expects($this->once())
134138
->method('getHeader')
135139
->with('OC-Total-Length')
136140
->willReturn(4);
137141

138-
$this->assertNull($this->plugin->beforeMove('source', 'target'));
142+
$this->assertFalse($this->plugin->beforeMove('source', 'target'));
139143
}
140144

141145
public function testBeforeMoveFutureFileMoveIt() {

0 commit comments

Comments
 (0)