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.response_test; | |
6 | |
7 import 'dart:async'; | 5 import 'dart:async'; |
8 import 'dart:convert'; | 6 import 'dart:convert'; |
9 | 7 |
10 import 'package:shelf/shelf.dart' hide Request; | 8 import 'package:shelf/shelf.dart' hide Request; |
11 import 'package:test/test.dart'; | 9 import 'package:test/test.dart'; |
12 | 10 |
13 import 'test_util.dart'; | 11 import 'test_util.dart'; |
14 | 12 |
15 void main() { | 13 void main() { |
16 group("supports a String body", () { | 14 group("supports a String body", () { |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 var response = new Response.ok(null); | 132 var response = new Response.ok(null); |
135 var changed1 = response.change(); | 133 var changed1 = response.change(); |
136 var changed2 = response.change(); | 134 var changed2 = response.change(); |
137 | 135 |
138 expect(changed2.read().toList(), completion(isEmpty)); | 136 expect(changed2.read().toList(), completion(isEmpty)); |
139 expect(changed1.read, throwsStateError); | 137 expect(changed1.read, throwsStateError); |
140 expect(response.read, throwsStateError); | 138 expect(response.read, throwsStateError); |
141 }); | 139 }); |
142 }); | 140 }); |
143 } | 141 } |
OLD | NEW |