diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-10-15 16:15:42 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-10-26 16:15:14 +0100 |
commit | a9a6d4c1826c7d1c1d11af9af349b67ba5af4923 (patch) | |
tree | fd41f5ae658f5666166f569adec6508057f30e41 /tests/settings | |
parent | 5181e5c29a1037137e8435c46c3a9075fe858a21 (diff) | |
download | nextcloud-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.php | 21 |
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)); + } } |