From 6a2e7632d17eb2b239aad068ba1dcd1252d6ae0f Mon Sep 17 00:00:00 2001 From: Robin McCorkell Date: Mon, 14 Sep 2015 22:21:42 +0100 Subject: Fix JS unit tests --- apps/files_external/js/settings.js | 3 +-- apps/files_external/tests/js/settingsSpec.js | 7 +++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js index d2ff23e89b8..586b9af7a88 100644 --- a/apps/files_external/js/settings.js +++ b/apps/files_external/js/settings.js @@ -624,8 +624,6 @@ MountConfigListView.prototype = _.extend({ this._allAuthMechanisms = this.$el.find('#addMountPoint .authentication').data('mechanisms'); this._initEvents(); - - this.loadStorages(); }, /** @@ -1194,6 +1192,7 @@ $(document).ready(function() { var mountConfigListView = new MountConfigListView($('#externalStorage'), { encryptionEnabled: encryptionEnabled }); + mountConfigListView.loadStorages(); $('#sslCertificate').on('click', 'td.remove>img', function() { var $tr = $(this).closest('tr'); diff --git a/apps/files_external/tests/js/settingsSpec.js b/apps/files_external/tests/js/settingsSpec.js index 67a81277124..3d0168898ca 100644 --- a/apps/files_external/tests/js/settingsSpec.js +++ b/apps/files_external/tests/js/settingsSpec.js @@ -54,7 +54,8 @@ describe('OCA.External.Settings tests', function() { // within the DOM by the server template $('#externalStorage .selectBackend:first').data('configurations', { '\\OC\\TestBackend': { - 'backend': 'Test Backend Name', + 'identifier': '\\OC\\TestBackend', + 'name': 'Test Backend', 'configuration': { 'field1': 'Display Name 1', 'field2': '&Display Name 2' @@ -65,7 +66,8 @@ describe('OCA.External.Settings tests', function() { 'priority': 11 }, '\\OC\\AnotherTestBackend': { - 'backend': 'Another Test Backend Name', + 'identifier': '\\OC\\AnotherTestBackend', + 'name': 'Another Test Backend', 'configuration': { 'field1': 'Display Name 1', 'field2': '&Display Name 2' @@ -80,6 +82,7 @@ describe('OCA.External.Settings tests', function() { $('#externalStorage #addMountPoint .authentication:first').data('mechanisms', { 'mechanism1': { + 'identifier': 'mechanism1', 'name': 'Mechanism 1', 'configuration': { }, -- cgit v1.2.3