aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/tests
diff options
context:
space:
mode:
authorRobin McCorkell <rmccorkell@owncloud.com>2016-02-08 13:16:00 +0000
committerRobin McCorkell <robin@mccorkell.me.uk>2016-05-03 11:30:02 +0100
commitde98a6e54cd2d732e0b7c1297e8da43e53bb97c7 (patch)
treed181a50261fea23ee4366bb70da0f6d02c03d834 /apps/files_external/tests
parent06293783e0d291a5595b55a3268d8bc0704277db (diff)
downloadnextcloud-server-de98a6e54cd2d732e0b7c1297e8da43e53bb97c7.tar.gz
nextcloud-server-de98a6e54cd2d732e0b7c1297e8da43e53bb97c7.zip
Allow multiple custom JS files
Diffstat (limited to 'apps/files_external/tests')
-rw-r--r--apps/files_external/tests/backend/legacybackendtest.php2
-rw-r--r--apps/files_external/tests/frontenddefinitiontraittest.php6
2 files changed, 5 insertions, 3 deletions
diff --git a/apps/files_external/tests/backend/legacybackendtest.php b/apps/files_external/tests/backend/legacybackendtest.php
index d825b7627b7..465b79a6be6 100644
--- a/apps/files_external/tests/backend/legacybackendtest.php
+++ b/apps/files_external/tests/backend/legacybackendtest.php
@@ -62,7 +62,7 @@ class LegacyBackendTest extends \Test\TestCase {
$this->assertEquals('\OCA\Files_External\Tests\Backend\LegacyBackendTest', $backend->getStorageClass());
$this->assertEquals('Backend text', $backend->getText());
$this->assertEquals(123, $backend->getPriority());
- $this->assertEquals('foo/bar.js', $backend->getCustomJs());
+ $this->assertContains('foo/bar.js', $backend->getCustomJs());
$this->assertArrayHasKey('builtin', $backend->getAuthSchemes());
$this->assertEquals($auth, $backend->getLegacyAuthMechanism());
diff --git a/apps/files_external/tests/frontenddefinitiontraittest.php b/apps/files_external/tests/frontenddefinitiontraittest.php
index 2afc87762e9..b3846fa1510 100644
--- a/apps/files_external/tests/frontenddefinitiontraittest.php
+++ b/apps/files_external/tests/frontenddefinitiontraittest.php
@@ -33,12 +33,14 @@ class FrontendDefinitionTraitTest extends \Test\TestCase {
$trait = $this->getMockForTrait('\OCA\Files_External\Lib\FrontendDefinitionTrait');
$trait->setText('test');
$trait->addParameters([$param]);
- $trait->setCustomJs('foo/bar.js');
+ $trait->addCustomJs('foo/bar.js');
+ $trait->addCustomJs('bar/foo.js');
$json = $trait->jsonSerializeDefinition();
$this->assertEquals('test', $json['name']);
- $this->assertEquals('foo/bar.js', $json['custom']);
+ $this->assertContains('foo/bar.js', $json['custom']);
+ $this->assertContains('bar/foo.js', $json['custom']);
$configuration = $json['configuration'];
$this->assertArrayHasKey('foo', $configuration);