diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2020-07-06 16:08:05 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2020-07-06 21:08:56 +0200 |
commit | 9c9c6961c2d43d3fffe50e36a02753a509056d72 (patch) | |
tree | 6a93097a17248ee6634b86c85cc9854e16a98776 /apps/sharebymail/tests/CapabilitiesTest.php | |
parent | 08bfd634068cd11166abb82bbb1c0da235da6cec (diff) | |
download | nextcloud-server-9c9c6961c2d43d3fffe50e36a02753a509056d72.tar.gz nextcloud-server-9c9c6961c2d43d3fffe50e36a02753a509056d72.zip |
Fix sharebymail tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/sharebymail/tests/CapabilitiesTest.php')
-rw-r--r-- | apps/sharebymail/tests/CapabilitiesTest.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/apps/sharebymail/tests/CapabilitiesTest.php b/apps/sharebymail/tests/CapabilitiesTest.php index dc642a16ec5..2bf05f188b6 100644 --- a/apps/sharebymail/tests/CapabilitiesTest.php +++ b/apps/sharebymail/tests/CapabilitiesTest.php @@ -26,19 +26,28 @@ namespace OCA\ShareByMail\Tests; use OCA\ShareByMail\Capabilities; +use OCA\ShareByMail\Settings\SettingsManager; use Test\TestCase; class CapabilitiesTest extends TestCase { /** @var Capabilities */ private $capabilities; + /** @var SettingsManager */ + private $settingsManager; + protected function setUp(): void { parent::setUp(); - $this->capabilities = new Capabilities(); + + $this->settingsManager = $this::createMock(SettingsManager::class); + $this->capabilities = new Capabilities($this->settingsManager); } public function testGetCapabilities() { + $this->settingsManager->method('enforcePasswordProtection') + ->willReturn(false); + $capabilities = [ 'files_sharing' => [ @@ -46,7 +55,7 @@ class CapabilitiesTest extends TestCase { [ 'enabled' => true, 'upload_files_drop' => ['enabled' => true], - 'password' => ['enabled' => true], + 'password' => ['enabled' => true, 'enforced' => false], 'expire_date' => ['enabled' => true] ] ] |