diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-11-04 20:27:25 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-12-07 22:01:34 +0300 |
commit | 768a77afd7ba0550d9c16943050bed476b125d38 (patch) | |
tree | b0da28e2552591a8baabfe268c02fd8e8184bc07 /tests | |
parent | 6f9ef2b76d3192525f2bb4ef909845787efeb4cc (diff) |
Allow admins to limit the size of attachements
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Unit/Controller/PageControllerTest.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/Unit/Controller/PageControllerTest.php b/tests/Unit/Controller/PageControllerTest.php index 9bbb9b702..b7d9e2a92 100644 --- a/tests/Unit/Controller/PageControllerTest.php +++ b/tests/Unit/Controller/PageControllerTest.php @@ -196,10 +196,12 @@ class PageControllerTest extends TestCase { $this->userSession->expects($this->once()) ->method('getUser') ->will($this->returnValue($user)); - $this->config->expects($this->once()) + $this->config ->method('getSystemValue') - ->with('debug', false) - ->will($this->returnValue(true)); + ->willReturnMap([ + ['debug', false, true], + ['app.mail.attachment-size-limit', 0, 123], + ]); $this->config->expects($this->once()) ->method('getAppValue') ->with('mail', 'installed_version') @@ -225,6 +227,7 @@ class PageControllerTest extends TestCase { $expected = new TemplateResponse($this->appName, 'index', [ 'debug' => true, + 'attachment-size-limit' => 123, 'external-avatars' => 'true', 'app-version' => '1.2.3', 'accounts' => base64_encode(json_encode($accountsJson)), |