add unit test
This commit is contained in:
parent
10b85871cc
commit
519d568847
|
@ -509,6 +509,8 @@ MountOptionsDropdown.prototype = {
|
|||
var optionId = $row.find('input, select').attr('name');
|
||||
if (enabledOptions.indexOf(optionId) === -1) {
|
||||
$row.hide();
|
||||
} else {
|
||||
$row.show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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}));
|
||||
|
||||
|
|
Loading…
Reference in New Issue