mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-10 02:58:51 -06:00
CreateRepetitionCommand: Run update() after executing
This commit is contained in:
@@ -96,7 +96,7 @@ public class CommandParserTest extends BaseUnitTest
|
||||
public void testDecodeCreateRepCommand() throws JSONException
|
||||
{
|
||||
CreateRepetitionCommand original, decoded;
|
||||
original = new CreateRepetitionCommand(habit, Timestamp.ZERO.plus(100), 5);
|
||||
original = new CreateRepetitionCommand(habitList, habit, Timestamp.ZERO.plus(100), 5);
|
||||
decoded = (CreateRepetitionCommand) parser.parse(original.toJson());
|
||||
|
||||
MatcherAssert.assertThat(decoded.getId(), equalTo(original.getId()));
|
||||
|
||||
@@ -47,7 +47,7 @@ public class CreateRepetitionCommandTest extends BaseUnitTest
|
||||
habitList.add(habit);
|
||||
|
||||
today = DateUtils.getToday();
|
||||
command = new CreateRepetitionCommand(habit, today, 100);
|
||||
command = new CreateRepetitionCommand(habitList, habit, today, 100);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -84,7 +84,7 @@ public class HabitCardListCacheTest extends BaseUnitTest
|
||||
{
|
||||
Habit h2 = habitList.getByPosition(2);
|
||||
Timestamp today = DateUtils.getToday();
|
||||
commandRunner.execute(new CreateRepetitionCommand(h2, today, Checkmark.UNCHECKED), h2.getId());
|
||||
commandRunner.execute(new CreateRepetitionCommand(habitList, h2, today, Checkmark.UNCHECKED), h2.getId());
|
||||
verify(listener).onItemChanged(2);
|
||||
verify(listener).onRefreshFinished();
|
||||
verifyNoMoreInteractions(listener);
|
||||
|
||||
Reference in New Issue
Block a user