From d88e289807139df1ed3c128e114d81d40db5670f Mon Sep 17 00:00:00 2001 From: Pat O'Connor Date: Sat, 28 Sep 2019 22:38:22 -0700 Subject: [PATCH] Bind the decoder to req.body --- test/controller_test.dart | 2 +- test/di_test.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/controller_test.dart b/test/controller_test.dart index d4b7938a..d8cdb05c 100644 --- a/test/controller_test.dart +++ b/test/controller_test.dart @@ -113,7 +113,7 @@ main() { }, optional: ['bar'])); var rq = MockHttpRequest('GET', Uri(path: 'foo')); await AngelHttp(app).handleRequest(rq); - var body = await rq.response.transform(utf8.decoder).join(); + var body = await utf8.decoder.bind(rq.response).join(); expect(json.decode(body), 2); }); diff --git a/test/di_test.dart b/test/di_test.dart index 8b23eb43..a0df1f36 100644 --- a/test/di_test.dart +++ b/test/di_test.dart @@ -28,7 +28,7 @@ main() { app.container.registerSingleton(Todo(text: TEXT, over: OVER)); app.container.registerFactory>((container) async { var req = container.make(); - var text = await req.body.transform(utf8.decoder).join(); + var text = await utf8.decoder.bind(req.body).join(); return Foo(text); });