Refactor database migration test and string trimming
This commit is contained in:
parent
4af5b5f6f2
commit
881d04ba1e
2 changed files with 22 additions and 18 deletions
|
|
@ -28,9 +28,6 @@ class DatabaseMigrationTest {
|
|||
|
||||
private const val DEFAULT_SECOND_SERVICE_ID = 1
|
||||
private const val DEFAULT_SECOND_URL = "https://www.youtube.com/watch?v=ncQU6iBn5Fc"
|
||||
|
||||
private const val DEFAULT_SEARCH1 = " abc "
|
||||
private const val DEFAULT_SEARCH2 = " abc"
|
||||
}
|
||||
|
||||
@get:Rule
|
||||
|
|
@ -163,28 +160,28 @@ class DatabaseMigrationTest {
|
|||
"search_history", SQLiteDatabase.CONFLICT_FAIL,
|
||||
ContentValues().apply {
|
||||
put("service_id", DEFAULT_SERVICE_ID)
|
||||
put("search", DEFAULT_SEARCH1)
|
||||
put("search", defaultSearch1)
|
||||
}
|
||||
)
|
||||
insert(
|
||||
"search_history", SQLiteDatabase.CONFLICT_FAIL,
|
||||
ContentValues().apply {
|
||||
put("service_id", DEFAULT_SERVICE_ID)
|
||||
put("search", DEFAULT_SEARCH2)
|
||||
put("search", defaultSearch2)
|
||||
}
|
||||
)
|
||||
insert(
|
||||
"search_history", SQLiteDatabase.CONFLICT_FAIL,
|
||||
ContentValues().apply {
|
||||
put("service_id", DEFAULT_SECOND_SERVICE_ID)
|
||||
put("search", DEFAULT_SEARCH1)
|
||||
put("search", defaultSearch1)
|
||||
}
|
||||
)
|
||||
insert(
|
||||
"search_history", SQLiteDatabase.CONFLICT_FAIL,
|
||||
ContentValues().apply {
|
||||
put("service_id", DEFAULT_SECOND_SERVICE_ID)
|
||||
put("search", DEFAULT_SEARCH2)
|
||||
put("search", defaultSearch2)
|
||||
}
|
||||
)
|
||||
close()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue