| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library shelf.message_test; | |
| 6 | |
| 7 import 'dart:async'; | 5 import 'dart:async'; |
| 8 import 'dart:convert'; | 6 import 'dart:convert'; |
| 9 | 7 |
| 10 import 'package:shelf/src/message.dart'; | 8 import 'package:shelf/src/message.dart'; |
| 11 import 'package:shelf/src/response.dart'; | 9 import 'package:shelf/src/response.dart'; |
| 12 import 'package:test/test.dart'; | 10 import 'package:test/test.dart'; |
| 13 | 11 |
| 14 import 'test_util.dart'; | 12 import 'test_util.dart'; |
| 15 | 13 |
| 16 class _TestMessage extends Message { | 14 class _TestMessage extends Message { |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 test("overwrites an existing charset if given an explicit encoding", () { | 246 test("overwrites an existing charset if given an explicit encoding", () { |
| 249 var request = _createMessage( | 247 var request = _createMessage( |
| 250 body: "è", | 248 body: "è", |
| 251 encoding: LATIN1, | 249 encoding: LATIN1, |
| 252 headers: {'content-type': 'text/plain; charset=whatever'}); | 250 headers: {'content-type': 'text/plain; charset=whatever'}); |
| 253 expect(request.headers, | 251 expect(request.headers, |
| 254 containsPair('content-type', 'text/plain; charset=iso-8859-1')); | 252 containsPair('content-type', 'text/plain; charset=iso-8859-1')); |
| 255 }); | 253 }); |
| 256 }); | 254 }); |
| 257 } | 255 } |
| OLD | NEW |