pull/309/head
Alinson S. Xavier 8 years ago
parent 96ab887545
commit af7c4e227d

@ -25,11 +25,11 @@ import org.isoron.uhabits.core.models.*;
import org.isoron.uhabits.core.preferences.*;
import org.isoron.uhabits.core.reminders.*;
import org.isoron.uhabits.core.ui.*;
import org.isoron.uhabits.core.utils.*;
import javax.inject.*;
import static org.isoron.uhabits.utils.DateUtils.*;
import static org.isoron.uhabits.core.utils.DateUtils.applyTimezone;
import static org.isoron.uhabits.core.utils.DateUtils.getLocalTime;
@ReceiverScope
public class ReminderController

@ -66,12 +66,13 @@ public class ReminderControllerTest extends BaseAndroidUnitTest
{
Habit habit = mock(Habit.class);
long now = timestamp(2015, 1, 1);
long nowTz = DateUtils.applyTimezone(now);
DateUtils.setFixedLocalTime(now);
when(preferences.getSnoozeInterval()).thenReturn(15L);
controller.onSnooze(habit);
verify(reminderScheduler).schedule(habit, now + 900000);
verify(reminderScheduler).schedule(habit, nowTz + 900000);
verify(notificationTray).cancel(habit);
}

Loading…
Cancel
Save