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

Unified Diff: pkg/shelf/test/request_test.dart

Issue 232073005: Addressed comments from review https://codereview.chromium.org/226263007 Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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 | « pkg/shelf/lib/src/response.dart ('k') | pkg/shelf/test/response_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/shelf/test/request_test.dart
diff --git a/pkg/shelf/test/request_test.dart b/pkg/shelf/test/request_test.dart
index 72a87a6b32675f02ea1ae0b32923792a95691bf1..a6235e0b3dc45f12530745d5aa52668ba6d58098 100644
--- a/pkg/shelf/test/request_test.dart
+++ b/pkg/shelf/test/request_test.dart
@@ -11,8 +11,10 @@ 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, Stream<List<int>> body,
+ Map<String, Object> context]) {
+ return new Request("GET", LOCALHOST_URI, headers: headers, body: body,
+ context: context);
}
void main() {
@@ -178,4 +180,14 @@ void main() {
});
});
});
+
+ group("context", () {
+ test("is correctly populated", () {
+ expect(_request({
+ 'content-type': 'text/plain'
+ }, null, {
+ 'my-param' : 42
+ }).context['my-param'], equals(42));
+ });
+ });
}
« no previous file with comments | « pkg/shelf/lib/src/response.dart ('k') | pkg/shelf/test/response_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698