aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-04-02 18:17:28 +0200
committerRobin Appelman <icewind@owncloud.com>2015-04-02 18:17:28 +0200
commit10b85871cc05918c795c57300edca219282daec1 (patch)
treede754ef816b412d91bb470294306719942f28917
parentbac9b54befcb609d5b96f63a070e212fcb83ec3c (diff)
downloadnextcloud-server-10b85871cc05918c795c57300edca219282daec1.tar.gz
nextcloud-server-10b85871cc05918c795c57300edca219282daec1.zip
adjust unt tests
-rw-r--r--apps/files_external/js/settings.js3
-rw-r--r--apps/files_external/tests/js/settingsSpec.js3
2 files changed, 4 insertions, 2 deletions
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js
index 232d5b96d5b..6854b40e87d 100644
--- a/apps/files_external/js/settings.js
+++ b/apps/files_external/js/settings.js
@@ -983,7 +983,8 @@ MountConfigListView.prototype = {
};
$(document).ready(function() {
- var encryptionEnabled = JSON.parse($('#files_external').attr('data-encryption-enabled'));
+ var enabled = $('#files_external').attr('data-encryption-enabled');
+ var encryptionEnabled = (enabled ==='true')? true: false;
var mountConfigListView = new MountConfigListView($('#externalStorage'), {
encryptionEnabled: encryptionEnabled
});
diff --git a/apps/files_external/tests/js/settingsSpec.js b/apps/files_external/tests/js/settingsSpec.js
index f030965835a..c5181737b31 100644
--- a/apps/files_external/tests/js/settingsSpec.js
+++ b/apps/files_external/tests/js/settingsSpec.js
@@ -85,7 +85,7 @@ describe('OCA.External.Settings tests', function() {
beforeEach(function() {
var $el = $('#externalStorage');
- view = new OCA.External.Settings.MountConfigListView($el);
+ view = new OCA.External.Settings.MountConfigListView($el, {encryptionEnabled: false});
});
afterEach(function() {
view = null;
@@ -226,6 +226,7 @@ describe('OCA.External.Settings tests', function() {
$('body').mouseup();
expect(JSON.parse($tr.find('input.mountOptions').val())).toEqual({
+ encrypt: true,
previews: true,
filesystem_check_changes: 2
});