Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adjust chunking test for non-existing target node
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Aug 12, 2020
commit cda5cfc01ea93244dbb1ea93a207d0933b6ba6db
10 changes: 7 additions & 3 deletions apps/dav/tests/unit/Upload/ChunkingPluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,18 @@ public function testBeforeMoveFutureFileSkipNonExisting() {
->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() {
Expand Down