Index: pkg/http/test/client_test.dart |
diff --git a/pkg/http/test/client_test.dart b/pkg/http/test/client_test.dart |
index e837ba8c9b777402fc9d82c70bcd9190f3b8d12c..164402b3d4603e1db5a03ebdbc5aa1a938fc4534 100644 |
--- a/pkg/http/test/client_test.dart |
+++ b/pkg/http/test/client_test.dart |
@@ -28,15 +28,17 @@ void main() { |
}).then((bytes) => new String.fromCharCodes(bytes)); |
future.catchError((_) {}).then((_) => client.close()); |
- expect(future, completion(parse(equals({ |
- 'method': 'POST', |
- 'path': '/', |
- 'headers': { |
- 'content-type': ['application/json; charset=utf-8'], |
- 'transfer-encoding': ['chunked'] |
- }, |
- 'body': '{"hello": "world"}' |
- })))); |
+ future.then(expectAsync1((content) { |
+ expect(content, parse(equals({ |
+ 'method': 'POST', |
+ 'path': '/', |
+ 'headers': { |
+ 'content-type': ['application/json; charset=utf-8'], |
+ 'transfer-encoding': ['chunked'] |
+ }, |
+ 'body': '{"hello": "world"}' |
+ }))); |
+ })); |
request.stream.writeString('{"hello": "world"}'); |
request.stream.close(); |