Skip to content
This repository was archived by the owner on Jan 31, 2026. It is now read-only.

Commit 2092481

Browse files
committed
test: extend RhttpCompatibleClient
1 parent 6b647de commit 2092481

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

rhttp/test/integration/compatible_client_test.dart

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ void main() {
1717

1818
final client = RhttpCompatibleClient.of(mockRhttpClient);
1919

20-
final response = await client.post(Uri.parse('https://example.com'));
20+
final Response response = await client.post(
21+
Uri.parse('https://example.com'),
22+
);
2123

2224
expect(response.headers, {
2325
'set-cookie': 'cookie1=value1; Path=/, cookie2=value2; Path=/',
@@ -28,5 +30,20 @@ void main() {
2830
'cookie2=value2; Path=/',
2931
],
3032
});
33+
34+
// Also test client.send()
35+
final StreamedResponse streamedResponse = await client.send(
36+
Request('POST', Uri.parse('https://example.com')),
37+
);
38+
39+
expect(streamedResponse.headers, {
40+
'set-cookie': 'cookie1=value1; Path=/, cookie2=value2; Path=/',
41+
});
42+
expect(streamedResponse.headersSplitValues, {
43+
'set-cookie': [
44+
'cookie1=value1; Path=/',
45+
'cookie2=value2; Path=/',
46+
],
47+
});
3148
});
3249
}

0 commit comments

Comments
 (0)