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

Unified Diff: test/response_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/request_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/response_test.dart
diff --git a/test/response_test.dart b/test/response_test.dart
index 71ff58fe403d2e105b57c74b23f81e0137ccffcb..7c399de57925d1b8e04f842f2128c3435530304d 100644
--- a/test/response_test.dart
+++ b/test/response_test.dart
@@ -27,40 +27,6 @@ void main() {
});
});
- group("new Response", () {
- test("defaults to encoding a String as UTF-8", () {
- expect(new Response.ok("è").read().toList(),
- completion(equals([[195, 168]])));
- });
-
- test("uses the explicit encoding if available", () {
- expect(new Response.ok("è", encoding: LATIN1).read().toList(),
- completion(equals([[232]])));
- });
-
- test("adds an explicit encoding to the content-type", () {
- var response = new Response.ok("è",
- encoding: LATIN1, headers: {'content-type': 'text/plain'});
- expect(response.headers,
- containsPair('content-type', 'text/plain; charset=iso-8859-1'));
- });
-
- test("sets an absent content-type to application/octet-stream in order to "
- "set the charset", () {
- var response = new Response.ok("è", encoding: LATIN1);
- expect(response.headers, containsPair(
- 'content-type', 'application/octet-stream; charset=iso-8859-1'));
- });
-
- test("overwrites an existing charset if given an explicit encoding", () {
- var response = new Response.ok("è",
- encoding: LATIN1,
- headers: {'content-type': 'text/plain; charset=whatever'});
- expect(response.headers,
- containsPair('content-type', 'text/plain; charset=iso-8859-1'));
- });
- });
-
group("new Response.internalServerError without a body", () {
test('sets the body to "Internal Server Error"', () {
var response = new Response.internalServerError();
« no previous file with comments | « test/request_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698