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 import 'package:scheduled_test/scheduled_test.dart'; | 5 import 'package:scheduled_test/scheduled_test.dart'; |
6 | 6 |
7 import '../descriptor.dart' as d; | 7 import '../descriptor.dart' as d; |
8 import '../test_pub.dart'; | 8 import '../test_pub.dart'; |
9 import '../serve/utils.dart'; | 9 import '../serve/utils.dart'; |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 d.dir('foo', [ | 31 d.dir('foo', [ |
32 d.file('file.txt', 'foo') | 32 d.file('file.txt', 'foo') |
33 ]), | 33 ]), |
34 d.nothing('test'), | 34 d.nothing('test'), |
35 d.nothing('web') | 35 d.nothing('web') |
36 ]) | 36 ]) |
37 ]).validate(); | 37 ]).validate(); |
38 }); | 38 }); |
39 | 39 |
40 integration("serves only the given directories", () { | 40 integration("serves only the given directories", () { |
41 pubServe(args: ["foo", "bar"]); | 41 pubServe(args: ["foo", "bar"], shouldGetFirst: true); |
42 | 42 |
43 requestShouldSucceed("file.txt", "bar", root: "bar"); | 43 requestShouldSucceed("file.txt", "bar", root: "bar"); |
44 requestShouldSucceed("file.txt", "foo", root: "foo"); | 44 requestShouldSucceed("file.txt", "foo", root: "foo"); |
45 expectNotServed("test"); | 45 expectNotServed("test"); |
46 expectNotServed("web"); | 46 expectNotServed("web"); |
47 | 47 |
48 endPubServe(); | 48 endPubServe(); |
49 }); | 49 }); |
50 } | 50 } |
OLD | NEW |