Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: test/request_test.dart

Issue 851423003: Request now has the same body model as Response (Closed) Base URL: https://github.com/dart-lang/shelf.git@master
Patch Set: nits Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/message_test.dart ('k') | test/response_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/request_test.dart
diff --git a/test/request_test.dart b/test/request_test.dart
index 47b1b7f6dd3e912d93579a30d67ced17233aeaf1..fa75bd0b9cf72c5a667ed51d080418beb511efa9 100644
--- a/test/request_test.dart
+++ b/test/request_test.dart
@@ -5,14 +5,16 @@
library shelf.request_test;
import 'dart:async';
+import 'dart:convert';
import 'package:shelf/shelf.dart';
import 'package:unittest/unittest.dart';
import 'test_util.dart';
-Request _request([Map<String, String> headers, Stream<List<int>> body]) {
- return new Request("GET", LOCALHOST_URI, headers: headers, body: body);
+Request _request({Map<String, String> headers, body, Encoding encoding}) {
+ return new Request("GET", LOCALHOST_URI,
+ headers: headers, body: body, encoding: encoding);
}
void main() {
@@ -125,8 +127,8 @@ void main() {
});
test("comes from the Last-Modified header", () {
- var request =
- _request({'if-modified-since': 'Sun, 06 Nov 1994 08:49:37 GMT'});
+ var request = _request(
+ headers: {'if-modified-since': 'Sun, 06 Nov 1994 08:49:37 GMT'});
expect(request.ifModifiedSince,
equals(DateTime.parse("1994-11-06 08:49:37z")));
});
« no previous file with comments | « test/message_test.dart ('k') | test/response_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698