mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
* updated test cases to support db upgrade in #2476 * fixed errors
This commit is contained in:
parent
cd145efe91
commit
9c6e9bd017
1 changed files with 9 additions and 5 deletions
|
|
@ -108,15 +108,19 @@ class ContributionDaoTest {
|
|||
@Test
|
||||
fun migrateTableVersionFrom_v6_to_v7() {
|
||||
Table.onUpdate(database, 6, 7)
|
||||
// Table didn't change in version 7
|
||||
verifyZeroInteractions(database)
|
||||
// Table has changed in version 7
|
||||
inOrder(database) {
|
||||
verify<SQLiteDatabase>(database).execSQL(Table.ADD_WIKI_DATA_ENTITY_ID_FIELD)
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun migrateTableVersionFrom_v7_to_v8() {
|
||||
Table.onUpdate(database, 7, 8)
|
||||
// Table didn't change in version 8
|
||||
verifyZeroInteractions(database)
|
||||
// Table has changed in version 8
|
||||
inOrder(database) {
|
||||
verify<SQLiteDatabase>(database).execSQL(Table.ADD_WIKI_DATA_ENTITY_ID_FIELD)
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue