Fixed some unit tests affected by the change in due time handling

pull/14/head
Sam Bosley 12 years ago
parent bb9b34a6be
commit ca9b7a486a

@ -60,7 +60,7 @@ public class AdvancedRepeatTests extends TodorooTestCase {
Date todayWithTime = new Date();
todayWithTime.setHours(10);
todayWithTime.setMinutes(4);
todayWithTime.setSeconds(0);
todayWithTime.setSeconds(1);
long nextDayWithTimeLong = todayWithTime.getTime();
nextDayWithTimeLong += DateUtilities.ONE_DAY;
nextDayWithTimeLong = nextDayWithTimeLong / 1000L * 1000;

@ -119,6 +119,9 @@ public class NewRepeatTests<REMOTE_MODEL> extends DatabaseTestCase {
Task t = new Task();
t.setValue(Task.TITLE, title);
long dueDate = DateUtilities.now() + DateUtilities.ONE_DAY * 3;
Date adjustDate = new Date(dueDate);
adjustDate.setSeconds(1);
dueDate = adjustDate.getTime();
dueDate = (dueDate / 1000L) * 1000L; // Strip milliseconds
if (fromCompletion)
t.setFlag(Task.FLAGS, Task.FLAG_REPEAT_AFTER_COMPLETION, true);

Loading…
Cancel
Save