From de98a6e54cd2d732e0b7c1297e8da43e53bb97c7 Mon Sep 17 00:00:00 2001 From: Robin McCorkell Date: Mon, 8 Feb 2016 13:16:00 +0000 Subject: Allow multiple custom JS files --- apps/files_external/tests/backend/legacybackendtest.php | 2 +- apps/files_external/tests/frontenddefinitiontraittest.php | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'apps/files_external/tests') 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); -- cgit v1.2.3