Index: pkg/http/test/mock_client_test.dart |
diff --git a/pkg/http/test/mock_client_test.dart b/pkg/http/test/mock_client_test.dart |
index f1f75bfe62e91e72e4f09953fcfc21284b2fe415..a77d96534ec69a5939caa38bbf56065ffe38de58 100644 |
--- a/pkg/http/test/mock_client_test.dart |
+++ b/pkg/http/test/mock_client_test.dart |
@@ -19,7 +19,7 @@ import 'utils.dart'; |
void main() { |
test('handles a request', () { |
var client = new MockClient((request) { |
- return new Future.immediate(new http.Response( |
+ return new Future.value(new http.Response( |
json.stringify(request.bodyFields), 200, |
request: request, headers: {'content-type': 'application/json'})); |
}); |
@@ -57,7 +57,7 @@ void main() { |
test('handles a request with no body', () { |
var client = new MockClient((request) { |
- return new Future.immediate(new http.Response('you did it', 200)); |
+ return new Future.value(new http.Response('you did it', 200)); |
}); |
expect(client.read("http://example.com/foo"), |