chore: bump line length to 120 (#20191)
This commit is contained in:
@@ -23,8 +23,7 @@ void main() {
|
||||
|
||||
group('getAll', () {
|
||||
test('sorts albums by backupSelection & isIosSharedAlbum', () async {
|
||||
final localAlbumRepo =
|
||||
mediumFactory.getRepository<DriftLocalAlbumRepository>();
|
||||
final localAlbumRepo = mediumFactory.getRepository<DriftLocalAlbumRepository>();
|
||||
await localAlbumRepo.upsert(
|
||||
mediumFactory.localAlbum(
|
||||
id: '1',
|
||||
|
||||
@@ -66,8 +66,7 @@ void main() {
|
||||
});
|
||||
|
||||
test('converts datetime', () async {
|
||||
DateTime? backupFailedSince =
|
||||
await sut.tryGet(StoreKey.backupFailedSince);
|
||||
DateTime? backupFailedSince = await sut.tryGet(StoreKey.backupFailedSince);
|
||||
expect(backupFailedSince, isNull);
|
||||
await sut.insert(StoreKey.backupFailedSince, _kTestBackupFailed);
|
||||
backupFailedSince = await sut.tryGet(StoreKey.backupFailedSince);
|
||||
|
||||
@@ -39,23 +39,19 @@ void main() {
|
||||
mockSyncApi = MockSyncApi();
|
||||
mockHttpClient = MockHttpClient();
|
||||
mockStreamedResponse = MockStreamedResponse();
|
||||
responseStreamController =
|
||||
StreamController<List<int>>.broadcast(sync: true);
|
||||
responseStreamController = StreamController<List<int>>.broadcast(sync: true);
|
||||
|
||||
registerFallbackValue(FakeBaseRequest());
|
||||
|
||||
when(() => mockApiService.apiClient).thenReturn(mockApiClient);
|
||||
when(() => mockApiService.syncApi).thenReturn(mockSyncApi);
|
||||
when(() => mockApiClient.basePath).thenReturn('http://demo.immich.app/api');
|
||||
when(() => mockApiService.applyToParams(any(), any()))
|
||||
.thenAnswer((_) async => {});
|
||||
when(() => mockApiService.applyToParams(any(), any())).thenAnswer((_) async => {});
|
||||
|
||||
// Mock HTTP client behavior
|
||||
when(() => mockHttpClient.send(any()))
|
||||
.thenAnswer((_) async => mockStreamedResponse);
|
||||
when(() => mockHttpClient.send(any())).thenAnswer((_) async => mockStreamedResponse);
|
||||
when(() => mockStreamedResponse.statusCode).thenReturn(200);
|
||||
when(() => mockStreamedResponse.stream)
|
||||
.thenAnswer((_) => http.ByteStream(responseStreamController.stream));
|
||||
when(() => mockStreamedResponse.stream).thenAnswer((_) => http.ByteStream(responseStreamController.stream));
|
||||
when(() => mockHttpClient.close()).thenAnswer((_) => {});
|
||||
|
||||
sut = SyncApiRepository(mockApiService);
|
||||
@@ -270,8 +266,7 @@ void main() {
|
||||
test('streamChanges throws ApiException on non-200 status code', () async {
|
||||
when(() => mockStreamedResponse.statusCode).thenReturn(401);
|
||||
final errorBodyController = StreamController<List<int>>(sync: true);
|
||||
when(() => mockStreamedResponse.stream)
|
||||
.thenAnswer((_) => http.ByteStream(errorBodyController.stream));
|
||||
when(() => mockStreamedResponse.stream).thenAnswer((_) => http.ByteStream(errorBodyController.stream));
|
||||
|
||||
int onDataCallCount = 0;
|
||||
|
||||
|
||||
@@ -16,16 +16,13 @@ class MockLogRepository extends Mock implements IsarLogRepository {}
|
||||
|
||||
class MockIsarUserRepository extends Mock implements IsarUserRepository {}
|
||||
|
||||
class MockDeviceAssetRepository extends Mock
|
||||
implements IsarDeviceAssetRepository {}
|
||||
class MockDeviceAssetRepository extends Mock implements IsarDeviceAssetRepository {}
|
||||
|
||||
class MockSyncStreamRepository extends Mock implements SyncStreamRepository {}
|
||||
|
||||
class MockLocalAlbumRepository extends Mock
|
||||
implements DriftLocalAlbumRepository {}
|
||||
class MockLocalAlbumRepository extends Mock implements DriftLocalAlbumRepository {}
|
||||
|
||||
class MockLocalAssetRepository extends Mock
|
||||
implements DriftLocalAssetRepository {}
|
||||
class MockLocalAssetRepository extends Mock implements DriftLocalAssetRepository {}
|
||||
|
||||
class MockStorageRepository extends Mock implements StorageRepository {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user