diff --git a/lib/image_test_utils.dart b/lib/image_test_utils.dart index 5fa03ff..c9850c4 100644 --- a/lib/image_test_utils.dart +++ b/lib/image_test_utils.dart @@ -64,7 +64,7 @@ MockHttpClient _createMockImageHttpClient(SecurityContext _, List imageByte when(client.getUrl(any)).thenAnswer((_) => Future.value(request)); when(request.headers).thenReturn(headers); when(request.close()).thenAnswer((_) => Future.value(response)); - when(response.contentLength).thenReturn(_transparentImage.length); + when(response.contentLength).thenReturn(imageBytes.length); when(response.statusCode).thenReturn(HttpStatus.ok); when(response.listen(any)).thenAnswer((Invocation invocation) { final void Function(List) onData = invocation.positionalArguments[0];