Skip to content

Commit

Permalink
Fix broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
JMoerman committed Feb 13, 2019
1 parent dfcc8fa commit c447e76
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/TaskStore.vala
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class TaskStore : Object, DragListModel {
}

/* Signals */
// Emitted when the properties of a task, excluding done, have changed
// Emitted when the properties of a task (including position), excluding done, have changed
public signal void task_data_changed ();
public signal void task_done_changed (TodoTask task);
public signal void task_became_invalid (TodoTask task);
Expand Down
6 changes: 6 additions & 0 deletions tests/TaskStoreTest.vala
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ class TaskStoreTest : TestCase {
items_changed_expected_position = 0;
items_changed_expected_added = 0;
items_changed_expected_removed = TEST_TASKS_LENGTH;
task_data_changed_expected = true;
test_store.clear ();
assert (!task_data_changed_expected);
assert (!items_changed_expected);
}

Expand Down Expand Up @@ -263,17 +265,21 @@ class TaskStoreTest : TestCase {
items_changed_expected_added = 0;
items_changed_expected = true;
items_changed_expected_position = expected_pos;
task_data_changed_expected = true;
test_store.remove_task (test_tasks[index]);
assert (!items_changed_expected);
assert (!task_data_changed_expected);
}

private void add_task (uint index, uint expected_pos) {
task_data_changed_expected = true;
items_changed_expected_removed = 0;
items_changed_expected_added = 1;
items_changed_expected = true;
items_changed_expected_position = expected_pos;
test_store.add_task (test_tasks[index]);
assert (!items_changed_expected);
assert (!task_data_changed_expected);
}

private void add_tasks () {
Expand Down

0 comments on commit c447e76

Please sign in to comment.