Chromium Code Reviews| 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..8f4d7b5ae795a9a225845303908e8cdf73d3a3e8 100644 |
| --- a/utils/tests/pub/update/pub_update_test.dart |
| +++ b/utils/tests/pub/update/pub_update_test.dart |
| @@ -84,4 +84,33 @@ 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!\$")); |
| + |
| + schedule(() { |
| + // 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!\$")); |
| + |
| + schedule(() { |
| + // The update should not have requested the pubspec since it's installed |
| + // locally already. |
| + expect(getRequestedPaths(), |
| + isNot(contains("packages/foo/versions/1.2.3.yaml"))); |
|
nweiz
2013/04/18 22:50:03
Shouldn't it actually be empty? It seems like you
Bob Nystrom
2013/04/18 23:07:10
It will contain a request for the version list for
|
| + }); |
| + }); |
| } |