summaryrefslogtreecommitdiffstats
path: root/apps/files_external/tests/js
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-04-02 18:31:26 +0200
committerRobin Appelman <icewind@owncloud.com>2015-04-02 18:31:26 +0200
commit519d5688478d44de83ab4997b790c8e7c6371a10 (patch)
tree0fd9d168f72c60d05e3079a0b4ae25785c37e2f7 /apps/files_external/tests/js
parent10b85871cc05918c795c57300edca219282daec1 (diff)
downloadnextcloud-server-519d5688478d44de83ab4997b790c8e7c6371a10.tar.gz
nextcloud-server-519d5688478d44de83ab4997b790c8e7c6371a10.zip
add unit test
Diffstat (limited to 'apps/files_external/tests/js')
-rw-r--r--apps/files_external/tests/js/settingsSpec.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/files_external/tests/js/settingsSpec.js b/apps/files_external/tests/js/settingsSpec.js
index c5181737b31..7cb86d7270b 100644
--- a/apps/files_external/tests/js/settingsSpec.js
+++ b/apps/files_external/tests/js/settingsSpec.js
@@ -205,6 +205,17 @@ describe('OCA.External.Settings tests', function() {
expect($td.find('.dropdown').length).toEqual(0);
});
+ it('doesnt show the encryption option when encryption is disabled', function () {
+ view._encryptionEnabled = false;
+ $td.find('img').click();
+
+ expect($td.find('.dropdown [name=encrypt]:visible').length).toEqual(0);
+
+ $('body').mouseup();
+
+ expect($td.find('.dropdown').length).toEqual(0);
+ });
+
it('reads config from mountOptions field', function() {
$tr.find('input.mountOptions').val(JSON.stringify({previews:false}));