mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
Fix default color and failing tests
This commit is contained in:
@@ -372,7 +372,7 @@ public class Habit
|
||||
|
||||
public HabitData()
|
||||
{
|
||||
this.color = 5;
|
||||
this.color = 8;
|
||||
this.archived = false;
|
||||
this.frequency = new Frequency(3, 7);
|
||||
this.type = YES_NO_HABIT;
|
||||
|
||||
@@ -94,13 +94,13 @@ public class ListHabitsSelectionMenuBehaviorTest extends BaseUnitTest
|
||||
@Test
|
||||
public void onChangeColor() throws Exception
|
||||
{
|
||||
assertThat(habit1.getColor(), equalTo(5));
|
||||
assertThat(habit2.getColor(), equalTo(5));
|
||||
assertThat(habit1.getColor(), equalTo(8));
|
||||
assertThat(habit2.getColor(), equalTo(8));
|
||||
when(adapter.getSelected()).thenReturn(asList(habit1, habit2));
|
||||
|
||||
behavior.onChangeColor();
|
||||
|
||||
verify(screen).showColorPicker(eq(5), colorPickerCallback.capture());
|
||||
verify(screen).showColorPicker(eq(8), colorPickerCallback.capture());
|
||||
colorPickerCallback.getValue().onColorPicked(30);
|
||||
assertThat(habit1.getColor(), equalTo(30));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user