Fix testChangeDefaultColumnTest.
I split testMigrateProfileId into two tests: one testing the migration
and one testing changing the default column test.
Since testChangeDefaultColumnTest does not migrate any profile ids, the
correct answer is indeed 1 and not 6. Next time I will be sure to run the
tests first :).
Change-Id: I7557e198072ed134c8b42d6187afcb93d388c5a1
diff --git a/tests/src/com/android/launcher3/provider/RestoreDbTaskTest.java b/tests/src/com/android/launcher3/provider/RestoreDbTaskTest.java
index 80facc6..6fa8d62 100644
--- a/tests/src/com/android/launcher3/provider/RestoreDbTaskTest.java
+++ b/tests/src/com/android/launcher3/provider/RestoreDbTaskTest.java
@@ -58,7 +58,7 @@
values.put(Favorites.TITLE, "item " + i);
db.insert(Favorites.TABLE_NAME, null, values);
}
- // Verify item add
+ // Verify default column is 42
assertEquals(5, getCount(db, "select * from favorites where profileId = 42"));
new RestoreDbTask().changeDefaultColumn(db, 33);
@@ -68,7 +68,7 @@
values.put(Favorites._ID, 100);
values.put(Favorites.TITLE, "item 100");
db.insert(Favorites.TABLE_NAME, null, values);
- assertEquals(6, getCount(db, "select * from favorites where profileId = 33"));
+ assertEquals(1, getCount(db, "select * from favorites where profileId = 33"));
}
private int getCount(SQLiteDatabase db, String sql) {