Skip to content

Commit

Permalink
feat: Updated test/services/report_service_test.da
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] authored Jan 22, 2024
1 parent dc865c6 commit 1691a47
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions test/services/report_service_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,11 @@ void main() {
);

test(
'getViolation should return a TrafficViolation when the http call completes successfully',
'getViolation should throw an exception when the http call is unsuccessful',
() async {
const int recordId = 1;
when(client.get(isA<Uri>() as Uri))
.thenAnswer((_) async => http.Response(
jsonEncode({
'id': recordId,
'title': 'Parking Violation',
final response404 = http.Response('', 404);
when(client.get(isA<Uri>())).thenAnswer((_) async => response404);
'date': '2024-01-15',
'time': '14:00',
'licensePlate': 'ABC123',
Expand Down

0 comments on commit 1691a47

Please sign in to comment.