From 28225a35b93bfa4f2c5fe93c99805e5bdc64984e Mon Sep 17 00:00:00 2001 From: Michiel de Jong Date: Tue, 28 Sep 2021 13:19:20 +0200 Subject: [PATCH] Failing unit test for #26 --- lib/Controller/RevaController.php | 2 +- tests/unit/controller/RevaControllerTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Controller/RevaController.php b/lib/Controller/RevaController.php index e930cca8..e44b0234 100644 --- a/lib/Controller/RevaController.php +++ b/lib/Controller/RevaController.php @@ -331,7 +331,7 @@ public function ListFolder($userId) { error_log(json_encode($resourceInfos)); return new JSONResponse($resourceInfos, 200); } else { - return new JSONResponse(["error" => "Folder not found"], 400); + return new JSONResponse(["error" => "Folder not found"], 404); } } diff --git a/tests/unit/controller/RevaControllerTest.php b/tests/unit/controller/RevaControllerTest.php index 8aaf371c..5a7f8138 100644 --- a/tests/unit/controller/RevaControllerTest.php +++ b/tests/unit/controller/RevaControllerTest.php @@ -500,7 +500,7 @@ public function testListFolderNotFound(){ ); $result = $controller->ListFolder($this->userId); - $this->assertEquals($result->getData(), []); + $this->assertEquals($result->getStatus(), 404); } public function testListFolderOther(){