adding test for hiding messages

This commit is contained in:
El RIDO 2017-11-16 09:04:27 +01:00
parent 9d1a9a0da7
commit 984941f901
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92

View file

@ -1243,5 +1243,24 @@ describe('PasteStatus', function () {
} }
); );
}); });
describe('hideMessages', function () {
before(function () {
cleanup();
});
it(
'hides all messages',
function() {
$('body').html(
'<div id="remainingtime"></div><div id="pastesuccess"></div>'
);
$.PrivateBin.PasteStatus.init();
$.PrivateBin.PasteStatus.hideMessages();
return $('#remainingtime').hasClass('hidden') &&
$('#pastesuccess').hasClass('hidden');
}
);
});
}); });