mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +01:00
Fix tests broken after downgrading flutter
This commit is contained in:
parent
2c817f3c37
commit
a1182bfbae
1 changed files with 10 additions and 7 deletions
|
@ -79,7 +79,7 @@ Future<void> _removeFile() async {
|
||||||
await src.remove(account, files[1]);
|
await src.remove(account, files[1]);
|
||||||
expect(
|
expect(
|
||||||
(await util.listAppDb(
|
(await util.listAppDb(
|
||||||
appDb, AppDb.file2StoreName, AppDbFile2Entry.fromJson))
|
appDb, AppDb.file2StoreName, (e) => AppDbFile2Entry.fromJson(e)))
|
||||||
.map((e) => e.file)
|
.map((e) => e.file)
|
||||||
.toList(),
|
.toList(),
|
||||||
[files[0]],
|
[files[0]],
|
||||||
|
@ -106,7 +106,8 @@ Future<void> _removeEmptyDir() async {
|
||||||
// parent dir is not updated, parent dir is only updated when syncing with
|
// parent dir is not updated, parent dir is only updated when syncing with
|
||||||
// remote
|
// remote
|
||||||
expect(
|
expect(
|
||||||
await util.listAppDb(appDb, AppDb.dirStoreName, AppDbDirEntry.fromJson),
|
await util.listAppDb(
|
||||||
|
appDb, AppDb.dirStoreName, (e) => AppDbDirEntry.fromJson(e)),
|
||||||
[
|
[
|
||||||
AppDbDirEntry.fromFiles(account, files[0], [files[1]]),
|
AppDbDirEntry.fromFiles(account, files[0], [files[1]]),
|
||||||
],
|
],
|
||||||
|
@ -132,7 +133,7 @@ Future<void> _removeDir() async {
|
||||||
await src.remove(account, files[1]);
|
await src.remove(account, files[1]);
|
||||||
expect(
|
expect(
|
||||||
(await util.listAppDb(
|
(await util.listAppDb(
|
||||||
appDb, AppDb.file2StoreName, AppDbFile2Entry.fromJson))
|
appDb, AppDb.file2StoreName, (e) => AppDbFile2Entry.fromJson(e)))
|
||||||
.map((e) => e.file)
|
.map((e) => e.file)
|
||||||
.toList(),
|
.toList(),
|
||||||
[files[0]],
|
[files[0]],
|
||||||
|
@ -159,14 +160,15 @@ Future<void> _removeDirWithSubDir() async {
|
||||||
final src = FileAppDbDataSource(appDb);
|
final src = FileAppDbDataSource(appDb);
|
||||||
await src.remove(account, files[1]);
|
await src.remove(account, files[1]);
|
||||||
expect(
|
expect(
|
||||||
await util.listAppDb(appDb, AppDb.dirStoreName, AppDbDirEntry.fromJson),
|
await util.listAppDb(
|
||||||
|
appDb, AppDb.dirStoreName, (e) => AppDbDirEntry.fromJson(e)),
|
||||||
[
|
[
|
||||||
AppDbDirEntry.fromFiles(account, files[0], [files[1]]),
|
AppDbDirEntry.fromFiles(account, files[0], [files[1]]),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
expect(
|
expect(
|
||||||
(await util.listAppDb(
|
(await util.listAppDb(
|
||||||
appDb, AppDb.file2StoreName, AppDbFile2Entry.fromJson))
|
appDb, AppDb.file2StoreName, (e) => AppDbFile2Entry.fromJson(e)))
|
||||||
.map((e) => e.file)
|
.map((e) => e.file)
|
||||||
.toList(),
|
.toList(),
|
||||||
[files[0]],
|
[files[0]],
|
||||||
|
@ -207,14 +209,15 @@ Future<void> _updateProperty() async {
|
||||||
overrideDateTime: OrNull(DateTime.utc(2020, 1, 2, 3, 4, 5, 678)),
|
overrideDateTime: OrNull(DateTime.utc(2020, 1, 2, 3, 4, 5, 678)),
|
||||||
);
|
);
|
||||||
expect(
|
expect(
|
||||||
await util.listAppDb(appDb, AppDb.dirStoreName, AppDbDirEntry.fromJson),
|
await util.listAppDb(
|
||||||
|
appDb, AppDb.dirStoreName, (e) => AppDbDirEntry.fromJson(e)),
|
||||||
[
|
[
|
||||||
AppDbDirEntry.fromFiles(account, files[0], [expectFile]),
|
AppDbDirEntry.fromFiles(account, files[0], [expectFile]),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
expect(
|
expect(
|
||||||
(await util.listAppDb(
|
(await util.listAppDb(
|
||||||
appDb, AppDb.file2StoreName, AppDbFile2Entry.fromJson))
|
appDb, AppDb.file2StoreName, (e) => AppDbFile2Entry.fromJson(e)))
|
||||||
.map((e) => e.file)
|
.map((e) => e.file)
|
||||||
.toList(),
|
.toList(),
|
||||||
[files[0], expectFile],
|
[files[0], expectFile],
|
||||||
|
|
Loading…
Reference in a new issue