improve TopNav.getExpiration test

This commit is contained in:
El RIDO 2024-05-09 16:11:15 +02:00
parent 2c8b5ed0e4
commit 81ad352c8c
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92

View file

@ -456,8 +456,14 @@ describe('TopNav', function () {
it(
'returns the currently selected expiration date',
function () {
$('body').html(
'<select id="pasteExpiration" name="pasteExpiration">' +
'<option value="1day">1 day</option>' +
'<option value="never">Never</option></select>'
);
$.PrivateBin.TopNav.init();
assert.ok($.PrivateBin.TopNav.getExpiration() === null);
assert.ok($.PrivateBin.TopNav.getExpiration() === '1day');
cleanup();
}
);
});