| Index: utils/tests/pub/update/pub_update_test.dart
|
| diff --git a/utils/tests/pub/update/pub_update_test.dart b/utils/tests/pub/update/pub_update_test.dart
|
| index 8242d887cf39cd795b1b3b4ebd87099f0e8e0d8e..160c6a5db13239bb987cfcf27456590cecc52e2f 100644
|
| --- a/utils/tests/pub/update/pub_update_test.dart
|
| +++ b/utils/tests/pub/update/pub_update_test.dart
|
| @@ -84,4 +84,30 @@ main() {
|
|
|
| d.packagesDir({"foo": null}).validate();
|
| });
|
| +
|
| + integration('does not request a pubspec for a cached package', () {
|
| + servePackages([packageMap("foo", "1.2.3")]);
|
| +
|
| + d.appDir([dependencyMap("foo", "1.2.3")]).create();
|
| +
|
| + // Run install once so it gets cached.
|
| + schedulePub(args: ['install'],
|
| + output: new RegExp("Dependencies installed!\$"));
|
| +
|
| + // Clear the cache. We don't care about anything that was served during
|
| + // the initial install.
|
| + getRequestedPaths();
|
| +
|
| + d.cacheDir({"foo": "1.2.3"}).validate();
|
| + d.packagesDir({"foo": "1.2.3"}).validate();
|
| +
|
| + schedulePub(args: ['update'],
|
| + output: new RegExp("Dependencies updated!\$"));
|
| +
|
| + // The update should not have requested the pubspec since it's installed
|
| + // locally already.
|
| + getRequestedPaths().then((paths) {
|
| + expect(paths, isNot(contains("packages/foo/versions/1.2.3.yaml")));
|
| + });
|
| + });
|
| }
|
|
|