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
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2016-10-31 19:08:11 +0300
committerLukas Reschke <lukas@statuscode.ch>2016-10-31 19:17:47 +0300
commita68595742b4a5e13f27bc5cc9d4bbd79044e1790 (patch)
treec1bc8766390682596b6ec02fbcd9f70542d9db6f /tests/Settings
parent8acb54aa0b32a8b750f8ab3aba9f63aa931be7d1 (diff)
Proxy images through usercontent.apps.nextcloud.com
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'tests/Settings')
-rw-r--r--tests/Settings/Controller/AppSettingsControllerTest.php16
1 files changed, 2 insertions, 14 deletions
diff --git a/tests/Settings/Controller/AppSettingsControllerTest.php b/tests/Settings/Controller/AppSettingsControllerTest.php
index 72fcf1bd7fc..a3e4a6fd828 100644
--- a/tests/Settings/Controller/AppSettingsControllerTest.php
+++ b/tests/Settings/Controller/AppSettingsControllerTest.php
@@ -28,13 +28,11 @@ use OC\Settings\Controller\AppSettingsController;
use OCP\AppFramework\Http\ContentSecurityPolicy;
use OCP\AppFramework\Http\JSONResponse;
use OCP\AppFramework\Http\TemplateResponse;
-use OCP\ICacheFactory;
use OCP\L10N\IFactory;
use Test\TestCase;
use OCP\IRequest;
use OCP\IL10N;
use OCP\IConfig;
-use OCP\ICache;
use OCP\INavigationManager;
use OCP\App\IAppManager;
@@ -52,8 +50,6 @@ class AppSettingsControllerTest extends TestCase {
private $l10n;
/** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
private $config;
- /** @var ICache|\PHPUnit_Framework_MockObject_MockObject */
- private $cache;
/** @var INavigationManager|\PHPUnit_Framework_MockObject_MockObject */
private $navigationManager;
/** @var IAppManager|\PHPUnit_Framework_MockObject_MockObject */
@@ -74,13 +70,6 @@ class AppSettingsControllerTest extends TestCase {
->method('t')
->will($this->returnArgument(0));
$this->config = $this->createMock(IConfig::class);
- $cacheFactory = $this->createMock(ICacheFactory::class);
- $this->cache = $this->createMock(ICache::class);
- $cacheFactory
- ->expects($this->once())
- ->method('create')
- ->with('settings')
- ->will($this->returnValue($this->cache));
$this->navigationManager = $this->createMock(INavigationManager::class);
$this->appManager = $this->createMock(IAppManager::class);
$this->categoryFetcher = $this->createMock(CategoryFetcher::class);
@@ -92,7 +81,6 @@ class AppSettingsControllerTest extends TestCase {
$this->request,
$this->l10n,
$this->config,
- $cacheFactory,
$this->navigationManager,
$this->appManager,
$this->categoryFetcher,
@@ -185,7 +173,7 @@ class AppSettingsControllerTest extends TestCase {
->with('core_apps');
$policy = new ContentSecurityPolicy();
- $policy->addAllowedImageDomain('*');
+ $policy->addAllowedImageDomain('https://usercontent.apps.nextcloud.com');
$expected = new TemplateResponse('settings', 'apps', ['category' => 'enabled', 'appstoreEnabled' => true], 'user');
$expected->setContentSecurityPolicy($policy);
@@ -205,7 +193,7 @@ class AppSettingsControllerTest extends TestCase {
->with('core_apps');
$policy = new ContentSecurityPolicy();
- $policy->addAllowedImageDomain('*');
+ $policy->addAllowedImageDomain('https://usercontent.apps.nextcloud.com');
$expected = new TemplateResponse('settings', 'apps', ['category' => 'enabled', 'appstoreEnabled' => false], 'user');
$expected->setContentSecurityPolicy($policy);