fully testing remaining time display function
This commit is contained in:
parent
73bc685178
commit
b1e1878861
|
@ -1226,14 +1226,17 @@ describe('PasteStatus', function () {
|
||||||
$.PrivateBin.PasteStatus.showRemainingTime({
|
$.PrivateBin.PasteStatus.showRemainingTime({
|
||||||
'burnafterreading': burnafterreading,
|
'burnafterreading': burnafterreading,
|
||||||
'remaining_time': remaining_time,
|
'remaining_time': remaining_time,
|
||||||
'expire_date': ((new Date()).getTime() / 1000) + remaining_time
|
'expire_date': remaining_time ? ((new Date()).getTime() / 1000) + remaining_time : 0
|
||||||
});
|
});
|
||||||
if (burnafterreading) {
|
if (burnafterreading) {
|
||||||
var result = $('#remainingtime').hasClass('foryoureyesonly') &&
|
var result = $('#remainingtime').hasClass('foryoureyesonly') &&
|
||||||
!$('#remainingtime').hasClass('hidden');
|
!$('#remainingtime').hasClass('hidden');
|
||||||
} else {
|
} else if (remaining_time) {
|
||||||
var result =!$('#remainingtime').hasClass('foryoureyesonly') &&
|
var result =!$('#remainingtime').hasClass('foryoureyesonly') &&
|
||||||
!$('#remainingtime').hasClass('hidden');
|
!$('#remainingtime').hasClass('hidden');
|
||||||
|
} else {
|
||||||
|
var result = $('#remainingtime').hasClass('hidden') &&
|
||||||
|
!$('#remainingtime').hasClass('foryoureyesonly');
|
||||||
}
|
}
|
||||||
clean();
|
clean();
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Reference in New Issue