blob: 56c92527c33a4e2599b3e4d766fcb092c6bd8e38 [file] [log] [blame]
// 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);
expect(request.contentLength, equals(-1));
expect(() => request.contentLength = 10, throwsStateError);