Skip to content

Commit

Permalink
fix: Formatting. #275
Browse files Browse the repository at this point in the history
  • Loading branch information
LuchoTurtle committed Oct 10, 2023
1 parent 6439db5 commit d6d300e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions test/unit/data/image_repository_test.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'dart:typed_data';

import 'package:dwyl_app/core/data_layer.dart';
import 'package:dwyl_app/data/repositories/image/image_repository.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:http/http.dart' as http;
Expand All @@ -13,7 +12,7 @@ void main() {
final bytes = Uint8List.fromList([0xff, 0xd8, 0xff, 0xe0]);

// Should return an URL, not an error.
final ret = await imageRepository.uploadImage(bytes, "cool_birthday");
final ret = await imageRepository.uploadImage(bytes, 'cool_birthday');
expect(ret.isRight(), true);
});

Expand All @@ -23,18 +22,18 @@ void main() {
final bytes = Uint8List.fromList([]);

// Should error out
final ret = await imageRepository.uploadImage(bytes, "cool_birthday");
final ret = await imageRepository.uploadImage(bytes, 'cool_birthday');
expect(ret.isLeft(), true);
});

test('ImageRepository should yield an error because bytes array has invalid mimetype', () async {
test('ImageRepository should yield an error because bytes array has invalid mimetype', () async {
final imageRepository = ImgupRepository(client: http.Client());

// Invalid byte array (a simple [0] does not have any mime type)
final bytes = Uint8List.fromList([0]);

// Should error out
final ret = await imageRepository.uploadImage(bytes, "cool_birthday");
final ret = await imageRepository.uploadImage(bytes, 'cool_birthday');
expect(ret.isLeft(), true);
});
}

0 comments on commit d6d300e

Please sign in to comment.