diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-10-16 13:13:36 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-10-16 21:39:34 +0300 |
commit | 5df7f9913f5b27a4f1abe20520ad5d711edbad5d (patch) | |
tree | 603008ff762a66edb85df09908ec20894de8b2e8 /tests | |
parent | 513046a7a022218daba2401a8bd32f14d28931f0 (diff) |
Remove getAccount from MessagesController
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Controller/MessagesControllerTest.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/Controller/MessagesControllerTest.php b/tests/Controller/MessagesControllerTest.php index 62c660c33..d1e29e99a 100644 --- a/tests/Controller/MessagesControllerTest.php +++ b/tests/Controller/MessagesControllerTest.php @@ -38,6 +38,7 @@ use OCA\Mail\Model\Message; use OCA\Mail\Service\AccountService; use OCA\Mail\Service\MailManager; use OCP\AppFramework\Db\DoesNotExistException; +use OCP\AppFramework\Http; use OCP\AppFramework\Http\ContentSecurityPolicy; use OCP\AppFramework\Http\JSONResponse; use OCP\AppFramework\Utility\ITimeFactory; @@ -417,9 +418,10 @@ class MessagesControllerTest extends TestCase { ->method('find') ->with($this->equalTo($this->userId), $this->equalTo($accountId)) ->will($this->throwException(new DoesNotExistException(''))); - $this->expectException(DoesNotExistException::class); - $this->controller->destroy($accountId, $folderId, $messageId); + $expected = new JSONResponse(null, Http::STATUS_FORBIDDEN); + + $this->assertEquals($expected, $this->controller->destroy($accountId, $folderId, $messageId)); } public function testDestroyWithFolderOrMessageNotFound() { |