Index: pkg/shelf/test/shelf_io_test.dart |
diff --git a/pkg/shelf/test/shelf_io_test.dart b/pkg/shelf/test/shelf_io_test.dart |
index c7d9f7a78d5ea449d2fda53bee17fb9703db65dc..b7ed8471dfd8bac1a9231378de55613eb54ec74c 100644 |
--- a/pkg/shelf/test/shelf_io_test.dart |
+++ b/pkg/shelf/test/shelf_io_test.dart |
@@ -284,6 +284,27 @@ void main() { |
}); |
}); |
}); |
+ |
+ group('server header', () { |
+ test('defaults to "dart:io with Shelf"', () { |
+ _scheduleServer(syncHandler); |
+ |
+ return _scheduleGet().then((response) { |
+ expect(response.headers, containsPair(HttpHeaders.SERVER, 'dart:io with Shelf')); |
nweiz
2014/05/27 23:08:05
Long line
kevmoo
2014/05/28 00:44:05
Done.
|
+ }); |
+ }); |
+ |
+ test('deferres to response header when', () { |
nweiz
2014/05/27 23:08:05
"deferres" -> "defers", "response header when" ->
kevmoo
2014/05/28 00:44:05
Done.
|
+ _scheduleServer((request) { |
+ return new Response.ok('test', |
+ headers: {HttpHeaders.SERVER: 'myServer'}); |
+ }); |
+ |
+ return _scheduleGet().then((response) { |
+ expect(response.headers, containsPair(HttpHeaders.SERVER, 'myServer')); |
+ }); |
+ }); |
+ }); |
} |
int _serverPort; |