Files
sdk/pkg/http/test/streamed_request_test.dart
T
kevmoo@j832.com 5285b80b8a pkg/http tweaks
locking down MultipartRequest a bit
Removed superfluous import of dart:io and dart:isolate

R=nweiz@google.com

Review URL: https://codereview.chromium.org//19866007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25376 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-23 22:47:13 +00:00

20 lines
620 B
Dart

// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
library streamed_request_test;
import 'package:http/http.dart' as http;
import 'package:unittest/unittest.dart';
import 'utils.dart';
void main() {
test('#finalize freezes contentLength', () {
var request = new http.StreamedRequest('POST', dummyUrl);
request.finalize();
expect(request.contentLength, equals(-1));
expect(() => request.contentLength = 10, throwsStateError);
});
}