Skip to content

Commit 5c47233

Browse files
committed
msglist test [nfc]: Refactor some code to use prepareBoringImageHttpClient
In the test ('Updates avatar on RealmUserUpdateEvent'), the code for setting a `FakeImageHttpClient` is replaced by the `prepareBoringImageHttpClient` function.
1 parent a7ed31e commit 5c47233

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

test/widgets/message_list_test.dart

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import 'dart:convert';
2-
import 'dart:io';
32

43
import 'package:checks/checks.dart';
54
import 'package:flutter/material.dart';
@@ -467,11 +466,7 @@ void main() {
467466
await tester.pump();
468467
}
469468

470-
final httpClient = FakeImageHttpClient();
471-
debugNetworkImageHttpClientProvider = () => httpClient;
472-
httpClient.request.response
473-
..statusCode = HttpStatus.ok
474-
..content = kSolidBlueAvatar;
469+
prepareBoringImageHttpClient();
475470

476471
await setupMessageListPage(tester, messageCount: 10);
477472
checkResultForSender(eg.selfUser.avatarUrl);

0 commit comments

Comments
 (0)