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

github.com/nextcloud/gallery.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorOlivier Paroz <github@oparoz.com>2015-09-12 14:19:39 +0300
committerOlivier Paroz <github@oparoz.com>2015-09-12 14:19:39 +0300
commit9c6fb8e893fc585e183161c21ee13db0b5725165 (patch)
tree9b4500f0c32f544d91ad51a27b0e65c97365f0cc /tests
parent78a91c361fd027fe3900dd9fe1b30e3c0ccd534f (diff)
Only return enabled features
Diffstat (limited to 'tests')
-rw-r--r--tests/api/GetConfigCest.php12
-rw-r--r--tests/unit/config/ConfigParserTest.php7
2 files changed, 13 insertions, 6 deletions
diff --git a/tests/api/GetConfigCest.php b/tests/api/GetConfigCest.php
index 329386f9..716e6c46 100644
--- a/tests/api/GetConfigCest.php
+++ b/tests/api/GetConfigCest.php
@@ -23,10 +23,14 @@ class GetConfigCest {
private $params = [
'extramediatypes' => false
];
- private $features = [
+ /**
+ * Has to match what is in the dataSetup configuration
+ *
+ * @var array
+ */
+ private $parsedFeatures = [
'features' => [
'external_shares' => 'yes',
- 'native_svg' => 'no',
]
];
private $mediaTypes = [
@@ -71,7 +75,7 @@ class GetConfigCest {
* Warning: Needs to match what is in the test config
* If we automate the detection, we're dependant on the results created by a 3rd party lib
*/
- $I->seeResponseContainsJson($this->features);
+ $I->seeResponseContainsJson($this->parsedFeatures);
/**
* TODO Replace with JSONPath once the library is fixed
*/
@@ -145,7 +149,7 @@ class GetConfigCest {
$I->expectTo('see the same config as in getConfig()');
$this->tryToGetAValidConfig($I);
- $I->seeResponseContainsJson($this->features);
+ $I->seeResponseContainsJson($this->parsedFeatures);
$I->seeResponseContainsJson($this->mediaTypes);
$I->fixMyConfigFile();
diff --git a/tests/unit/config/ConfigParserTest.php b/tests/unit/config/ConfigParserTest.php
index db3a5619..e3714b5b 100644
--- a/tests/unit/config/ConfigParserTest.php
+++ b/tests/unit/config/ConfigParserTest.php
@@ -51,6 +51,9 @@ class ConfigParserTest extends \Test\GalleryUnitTest {
'external_shares' => "no",
'native_svg' => "yes",
];
+ $parsedFeatureList = [
+ 'native_svg' => "yes",
+ ];
$features = [
'features' => $featureList
];
@@ -60,8 +63,8 @@ class ConfigParserTest extends \Test\GalleryUnitTest {
[$noFeatures, false, []],
[$emptyFeatures, false, []],
[$emptyFeatures, true, []],
- [$features, false, $featureList],
- [$features, true, $featureList],
+ [$features, false, $parsedFeatureList],
+ [$features, true, $parsedFeatureList],
];
}