Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
public class DBOpenHelper extends SQLiteOpenHelper {

private static final String DATABASE_NAME = "commons.db";
private static final int DATABASE_VERSION = 9;
private static final int DATABASE_VERSION = 10;

/**
* Do not use directly - @Inject an instance where it's needed and let
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,15 @@ class ContributionDaoTest {
}
}

@Test
fun migrateTableVersionFrom_v9_to_v10() {
Table.onUpdate(database, 8, 9)
// Table changed in version 9
inOrder(database) {
verify<SQLiteDatabase>(database).execSQL(Table.ADD_WIKI_DATA_ENTITY_ID_FIELD)
}
}

@Test
fun saveNewContribution_nonNullFields() {
whenever(client.insert(isA(), isA())).thenReturn(contentUri)
Expand Down