@@ -121,7 +121,7 @@ void main() {
121
121
group ('RealmContentNetworkImage' , () {
122
122
final authHeaders = authHeader (email: eg.selfAccount.email, apiKey: eg.selfAccount.apiKey);
123
123
124
- Future <String ?> actualAuthHeader (WidgetTester tester, String src) async {
124
+ Future <String ?> actualAuthHeader (WidgetTester tester, Uri src) async {
125
125
final globalStore = TestZulipBinding .instance.globalStore;
126
126
addTearDown (TestZulipBinding .instance.reset);
127
127
await globalStore.add (eg.selfAccount, eg.initialSnapshot ());
@@ -144,20 +144,20 @@ void main() {
144
144
}
145
145
146
146
testWidgets ('includes auth header if `src` on-realm' , (tester) async {
147
- check (await actualAuthHeader (tester, 'https://chat.example/image.png' ))
147
+ check (await actualAuthHeader (tester, Uri . parse ( 'https://chat.example/image.png' ) ))
148
148
.isNotNull ().equals (authHeaders['Authorization' ]! );
149
149
debugNetworkImageHttpClientProvider = null ;
150
150
});
151
151
152
152
testWidgets ('excludes auth header if `src` off-realm' , (tester) async {
153
- check (await actualAuthHeader (tester, 'https://other.example/image.png' ))
153
+ check (await actualAuthHeader (tester, Uri . parse ( 'https://other.example/image.png' ) ))
154
154
.isNull ();
155
155
debugNetworkImageHttpClientProvider = null ;
156
156
});
157
157
158
158
testWidgets ('throws if no `PerAccountStoreWidget` ancestor' , (WidgetTester tester) async {
159
159
await tester.pumpWidget (
160
- const RealmContentNetworkImage ('https://zulip.invalid/path/to/image.png' , filterQuality: FilterQuality .medium));
160
+ RealmContentNetworkImage (Uri . parse ( 'https://zulip.invalid/path/to/image.png' ) , filterQuality: FilterQuality .medium));
161
161
check (tester.takeException ()).isA <AssertionError >();
162
162
});
163
163
});
0 commit comments