Fix merge

This commit is contained in:
2017-06-10 19:34:44 -04:00
parent 96ab887545
commit af7c4e227d
2 changed files with 4 additions and 3 deletions

View File

@@ -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

View File

@@ -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);
}