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
parent 860f6d8fcf
commit cda5cfc01e
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
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() {