diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2015-09-12 16:25:23 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2015-09-15 15:10:13 +0200 |
commit | 91dfcab0553a8bbc13df4b57e9fed061741bea74 (patch) | |
tree | dc719da9a0d3416945dbfb560f38ee9fb0a6725d /apps/files_sharing/tests/capabilities.php | |
parent | 650e600b942d830460bb96de6726bdd1e8284a8e (diff) | |
download | nextcloud-server-91dfcab0553a8bbc13df4b57e9fed061741bea74.tar.gz nextcloud-server-91dfcab0553a8bbc13df4b57e9fed061741bea74.zip |
Expose federated sharing capabilities to authenticated users
Diffstat (limited to 'apps/files_sharing/tests/capabilities.php')
-rw-r--r-- | apps/files_sharing/tests/capabilities.php | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/apps/files_sharing/tests/capabilities.php b/apps/files_sharing/tests/capabilities.php index 5b9789ce324..f1a9626db9b 100644 --- a/apps/files_sharing/tests/capabilities.php +++ b/apps/files_sharing/tests/capabilities.php @@ -202,5 +202,40 @@ class FilesSharingCapabilitiesTest extends \Test\TestCase { $this->assertFalse($result['public']['upload']); } + public function testFederatedSharingIncomming() { + $map = [ + ['files_sharing', 'incoming_server2server_share_enabled', 'yes', 'yes'], + ]; + $result = $this->getResults($map); + $this->assertArrayHasKey('federation', $result); + $this->assertTrue($result['federation']['incoming']); + } + + public function testFederatedSharingNoIncomming() { + $map = [ + ['files_sharing', 'incoming_server2server_share_enabled', 'yes', 'no'], + ]; + $result = $this->getResults($map); + $this->assertArrayHasKey('federation', $result); + $this->assertFalse($result['federation']['incoming']); + } + + public function testFederatedSharingOutgoing() { + $map = [ + ['files_sharing', 'outgoing_server2server_share_enabled', 'yes', 'yes'], + ]; + $result = $this->getResults($map); + $this->assertArrayHasKey('federation', $result); + $this->assertTrue($result['federation']['outgoing']); + } + + public function testFederatedSharingNoOutgoing() { + $map = [ + ['files_sharing', 'outgoing_server2server_share_enabled', 'yes', 'no'], + ]; + $result = $this->getResults($map); + $this->assertArrayHasKey('federation', $result); + $this->assertFalse($result['federation']['outgoing']); + } } |