summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/tests/capabilities.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2015-02-09 14:26:49 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2015-03-11 15:02:55 +0100
commitaf76716775f0f16755fa3369b6336feded291f70 (patch)
tree75a85b23493f1e0f4e2d99888017a0d82ce88a75 /apps/files_sharing/tests/capabilities.php
parent0bf1152a512d72a390da3b6ae9432066db4df1fa (diff)
downloadnextcloud-server-af76716775f0f16755fa3369b6336feded291f70.tar.gz
nextcloud-server-af76716775f0f16755fa3369b6336feded291f70.zip
Now added enabled element
This change allows for more generic parsing for the capabilities.
Diffstat (limited to 'apps/files_sharing/tests/capabilities.php')
-rw-r--r--apps/files_sharing/tests/capabilities.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/files_sharing/tests/capabilities.php b/apps/files_sharing/tests/capabilities.php
index 1b63030501b..a9980c63fea 100644
--- a/apps/files_sharing/tests/capabilities.php
+++ b/apps/files_sharing/tests/capabilities.php
@@ -53,7 +53,8 @@ class FilesSharingCapabilitiesTest extends \Test\TestCase {
array('core', 'shareapi_allow_links', 'yes', 'no'),
);
$result = $this->getResults($map);
- $this->assertFalse($result['public']);
+ $this->assertInternalType('array', $result['public']);
+ $this->assertFalse($result['public']['enabled']);
}
/**
@@ -65,6 +66,7 @@ class FilesSharingCapabilitiesTest extends \Test\TestCase {
);
$result = $this->getResults($map);
$this->assertInternalType('array', $result['public']);
+ $this->assertTrue($result['public']['enabled']);
}
/**
@@ -103,7 +105,8 @@ class FilesSharingCapabilitiesTest extends \Test\TestCase {
);
$result = $this->getResults($map);
$this->assertArrayHasKey('expire_date', $result['public']);
- $this->assertFalse($result['public']['expire_date']);
+ $this->assertInternalType('array', $result['public']['expire_date']);
+ $this->assertFalse($result['public']['expire_date']['enabled']);
}
/**
@@ -119,6 +122,7 @@ class FilesSharingCapabilitiesTest extends \Test\TestCase {
$result = $this->getResults($map);
$this->assertArrayHasKey('expire_date', $result['public']);
$this->assertInternalType('array', $result['public']['expire_date']);
+ $this->assertTrue($result['public']['expire_date']['enabled']);
$this->assertArrayHasKey('days', $result['public']['expire_date']);
$this->assertFalse($result['public']['expire_date']['enforce']);
}