Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-05-14 12:27:17 +0300
committerJoas Schilling <coding@schilljs.com>2020-05-14 13:27:28 +0300
commit923a49268e3cf42528a85edaf4554216fd039c27 (patch)
treefb17e6df7a136e29497d5a728dc65952b13f37ba /tests
parent05881c5ab224f4c451fb44b786b7bc216ce2c508 (diff)
Only send the capability when the config is set
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/php/CapabilitiesTest.php18
1 files changed, 7 insertions, 11 deletions
diff --git a/tests/php/CapabilitiesTest.php b/tests/php/CapabilitiesTest.php
index 4a47cc075..b2a7f9445 100644
--- a/tests/php/CapabilitiesTest.php
+++ b/tests/php/CapabilitiesTest.php
@@ -65,9 +65,9 @@ class CapabilitiesTest extends TestCase {
->method('isDisabledForUser');
$this->serverConfig->expects($this->once())
- ->method('getSystemValueString')
- ->with('version', '0.0.0')
- ->willReturn('16.0.1');
+ ->method('getAppValue')
+ ->with('spreed', 'has_reference_id', 'no')
+ ->willReturn('no');
$this->assertInstanceOf(IPublicCapability::class, $capabilities);
$this->assertSame([
@@ -97,14 +97,13 @@ class CapabilitiesTest extends TestCase {
'chat-replies',
'circles-support',
'force-mute',
- 'chat-reference-id',
],
'config' => [
'attachments' => [
'allowed' => false,
],
'chat' => [
- 'max-length' => 1000,
+ 'max-length' => 32000,
],
'conversations' => [
'can-create' => false,
@@ -157,9 +156,9 @@ class CapabilitiesTest extends TestCase {
->willReturn($isNotAllowed);
$this->serverConfig->expects($this->once())
- ->method('getSystemValueString')
- ->with('version', '0.0.0')
- ->willReturn('16.0.2');
+ ->method('getAppValue')
+ ->with('spreed', 'has_reference_id', 'no')
+ ->willReturn('yes');
$this->assertInstanceOf(IPublicCapability::class, $capabilities);
$this->assertSame([
@@ -224,9 +223,6 @@ class CapabilitiesTest extends TestCase {
->with($user)
->willReturn(true);
- $this->serverConfig->expects($this->never())
- ->method('getSystemValueString');
-
$this->assertInstanceOf(IPublicCapability::class, $capabilities);
$this->assertSame([], $capabilities->getCapabilities());
}