diff options
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] ] ] |