OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 pub_tests; | 5 library pub_tests; |
6 | 6 |
7 import 'package:scheduled_test/scheduled_test.dart'; | 7 import 'package:scheduled_test/scheduled_test.dart'; |
8 | 8 |
9 import '../../descriptor.dart' as d; | 9 import '../../descriptor.dart' as d; |
10 import '../../test_pub.dart'; | 10 import '../../test_pub.dart'; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 pubGet(); | 43 pubGet(); |
44 | 44 |
45 d.packagesDir({ | 45 d.packagesDir({ |
46 "foo": "1.2.0", | 46 "foo": "1.2.0", |
47 "bar": "1.2.0" | 47 "bar": "1.2.0" |
48 }).validate(); | 48 }).validate(); |
49 | 49 |
50 // The get should not have done any network requests since the lock file is | 50 // The get should not have done any network requests since the lock file is |
51 // up to date. | 51 // up to date. |
52 getRequestedPaths().then((paths) { | 52 getRequestedPaths().then((paths) { |
53 expect(paths, unorderedEquals([ | 53 expect( |
54 // Bar should be requested because it's new, but not foo. | 54 paths, |
55 "api/packages/bar", | 55 unorderedEquals([// Bar should be requested because it's new, but not
foo. |
56 // Should only request the most recent version. | 56 "api/packages/bar", // Should only request the most recent version. |
57 "api/packages/bar/versions/1.2.0", | 57 "api/packages/bar/versions/1.2.0", // Need to download it. |
58 // Need to download it. | 58 "packages/bar/versions/1.2.0.tar.gz"])); |
59 "packages/bar/versions/1.2.0.tar.gz" | |
60 ])); | |
61 }); | 59 }); |
62 }); | 60 }); |
63 } | 61 } |
OLD | NEW |