aboutsummaryrefslogtreecommitdiffstats
path: root/tests/settings
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-10-15 16:15:42 +0200
committerJoas Schilling <nickvergessen@owncloud.com>2015-10-26 16:15:14 +0100
commita9a6d4c1826c7d1c1d11af9af349b67ba5af4923 (patch)
treefd41f5ae658f5666166f569adec6508057f30e41 /tests/settings
parent5181e5c29a1037137e8435c46c3a9075fe858a21 (diff)
downloadnextcloud-server-a9a6d4c1826c7d1c1d11af9af349b67ba5af4923.tar.gz
nextcloud-server-a9a6d4c1826c7d1c1d11af9af349b67ba5af4923.zip
Stay on the same category when refreshing the page on the apps list
Diffstat (limited to 'tests/settings')
-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));
+ }
}