mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 09:12:57 +02:00
fix(mobile): exifInfo not updated on sync (#17407)
* fix(mobile): exifInfo not updated on sync * add tests --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
parent
042da669d1
commit
43d585ce55
8 changed files with 148 additions and 4 deletions
mobile/test/modules/shared
|
@ -16,6 +16,7 @@ import 'package:immich_mobile/services/sync.service.dart';
|
|||
import 'package:mocktail/mocktail.dart';
|
||||
|
||||
import '../../domain/service.mock.dart';
|
||||
import '../../fixtures/asset.stub.dart';
|
||||
import '../../infrastructure/repository.mock.dart';
|
||||
import '../../repository.mocks.dart';
|
||||
import '../../service.mocks.dart';
|
||||
|
@ -258,6 +259,19 @@ void main() {
|
|||
expect(c, isTrue);
|
||||
verify(() => assetRepository.updateAll(expected));
|
||||
});
|
||||
|
||||
group("upsertAssetsWithExif", () {
|
||||
test('test upsert with EXIF data', () async {
|
||||
final assets = [AssetStub.image1, AssetStub.image2];
|
||||
|
||||
expect(
|
||||
assets.map((a) => a.exifInfo?.assetId),
|
||||
List.filled(assets.length, null),
|
||||
);
|
||||
await s.upsertAssetsWithExif(assets);
|
||||
expect(assets.map((a) => a.exifInfo?.assetId), assets.map((a) => a.id));
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue