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

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-10-15 17:15:42 +0300
committerJoas Schilling <nickvergessen@owncloud.com>2015-10-26 18:15:14 +0300
commita9a6d4c1826c7d1c1d11af9af349b67ba5af4923 (patch)
treefd41f5ae658f5666166f569adec6508057f30e41 /tests
parent5181e5c29a1037137e8435c46c3a9075fe858a21 (diff)
Stay on the same category when refreshing the page on the apps list
Diffstat (limited to 'tests')
-rw-r--r--tests/settings/controller/AppSettingsControllerTest.php21
1 files changed, 20 insertions, 1 deletions
diff --git a/tests/settings/controller/AppSettingsControllerTest.php b/tests/settings/controller/AppSettingsControllerTest.php
index d6379deb9c8..62eebc2de50 100644
--- a/tests/settings/controller/AppSettingsControllerTest.php
+++ b/tests/settings/controller/AppSettingsControllerTest.php
@@ -223,9 +223,28 @@ class AppSettingsControllerTest extends TestCase {
$policy = new ContentSecurityPolicy();
$policy->addAllowedImageDomain('https://apps.owncloud.com');
- $expected = new TemplateResponse('settings', 'apps', ['experimentalEnabled' => false], 'user');
+ $expected = new TemplateResponse('settings', 'apps', ['experimentalEnabled' => false, 'category' => 0], 'user');
$expected->setContentSecurityPolicy($policy);
$this->assertEquals($expected, $this->appSettingsController->viewApps());
}
+
+ public function testViewAppsNotEnabled() {
+ $this->config
+ ->expects($this->once())
+ ->method('getSystemValue')
+ ->with('appstore.experimental.enabled', false);
+ $this->navigationManager
+ ->expects($this->once())
+ ->method('setActiveEntry')
+ ->with('core_apps');
+
+ $policy = new ContentSecurityPolicy();
+ $policy->addAllowedImageDomain('https://apps.owncloud.com');
+
+ $expected = new TemplateResponse('settings', 'apps', ['experimentalEnabled' => false, 'category' => 1], 'user');
+ $expected->setContentSecurityPolicy($policy);
+
+ $this->assertEquals($expected, $this->appSettingsController->viewApps(1));
+ }
}