Adjust chunking test for non-existing target node

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2020-08-12 08:18:35 +02:00 committed by backportbot[bot]
parent 242b19f18e
commit b83c858e6d
1 changed files with 7 additions and 3 deletions

View File

@ -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() {