diff --git a/js/test.js b/js/test.js index 2462cc27..f5100af0 100644 --- a/js/test.js +++ b/js/test.js @@ -1089,5 +1089,29 @@ describe('Alert', function () { } ); }); + + describe('hideMessages', function () { + before(function () { + cleanup(); + }); + + it( + 'hides all messages', + function() { + $('body').html( + '
' + + ' ' + ); + $.PrivateBin.Alert.init(); + $.PrivateBin.Alert.hideMessages(); + return $('#statusmessage').hasClass('hidden') && + $('#errormessage').hasClass('hidden'); + } + ); + }); });