diff options
Diffstat (limited to 'core/js/tests/specs/shareSpec.js')
-rw-r--r-- | core/js/tests/specs/shareSpec.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/js/tests/specs/shareSpec.js b/core/js/tests/specs/shareSpec.js index e712ea58bc2..f714b41dda6 100644 --- a/core/js/tests/specs/shareSpec.js +++ b/core/js/tests/specs/shareSpec.js @@ -31,6 +31,7 @@ describe('OC.Share tests', function() { $('#testArea').append($('<div id="shareContainer"></div>')); // horrible parameters $('#testArea').append('<input id="allowShareWithLink" type="hidden" value="yes">'); + $('#testArea').append('<input id="mailPublicNotificationEnabled" name="mailPublicNotificationEnabled" type="hidden" value="yes">'); $container = $('#shareContainer'); /* jshint camelcase:false */ oldAppConfig = _.extend({}, oc_appconfig.core); @@ -362,6 +363,16 @@ describe('OC.Share tests', function() { $('#dropdown [name=expirationCheckbox]').click(); expect($('#dropdown [name=expirationCheckbox]').prop('checked')).toEqual(true); }); + it('displayes email form when sending emails is enabled', function() { + $('input[name=mailPublicNotificationEnabled]').val('yes'); + showDropDown(); + expect($('#emailPrivateLink').length).toEqual(1); + }); + it('not renders email form when sending emails is disabled', function() { + $('input[name=mailPublicNotificationEnabled]').val('no'); + showDropDown(); + expect($('#emailPrivateLink').length).toEqual(0); + }); it('sets picker minDate to today and no maxDate by default', function() { showDropDown(); $('#dropdown [name=linkCheckbox]').click(); |