Index: tests/standalone/io/http_session_test.dart |
diff --git a/tests/standalone/io/http_session_test.dart b/tests/standalone/io/http_session_test.dart |
index 69f6a6b0d9b0f096099903986311ba635886a182..5648bd0597871a63a18b39e3948ef5a799c05b9b 100644 |
--- a/tests/standalone/io/http_session_test.dart |
+++ b/tests/standalone/io/http_session_test.dart |
@@ -8,7 +8,7 @@ import 'dart:io'; |
const SESSION_ID = "DARTSESSID"; |
String getSessionId(List<Cookie> cookies) { |
- var id = cookies.reduce(null, (last, cookie) { |
+ var id = cookies.fold(null, (last, cookie) { |
if (last != null) return last; |
if (cookie.name.toUpperCase() == SESSION_ID) { |
Expect.isTrue(cookie.httpOnly); |
@@ -30,7 +30,7 @@ Future<String> connectGetSession( |
return request.close(); |
}) |
.then((response) { |
- return response.reduce(getSessionId(response.cookies), (v, _) => v); |
+ return response.fold(getSessionId(response.cookies), (v, _) => v); |
}); |
} |