Chromium Code Reviews| Index: sdk/lib/_internal/pub/test/serve/installs_first_if_dependency_added_test.dart |
| diff --git a/sdk/lib/_internal/pub/test/serve/missing_dependency_file_test.dart b/sdk/lib/_internal/pub/test/serve/installs_first_if_dependency_added_test.dart |
| similarity index 54% |
| copy from sdk/lib/_internal/pub/test/serve/missing_dependency_file_test.dart |
| copy to sdk/lib/_internal/pub/test/serve/installs_first_if_dependency_added_test.dart |
| index d1c47f24e8946cccca4545d3669afe06b403fde3..cbbf2db3260bb3efe05baeddbc828643248c9fb5 100644 |
| --- a/sdk/lib/_internal/pub/test/serve/missing_dependency_file_test.dart |
| +++ b/sdk/lib/_internal/pub/test/serve/installs_first_if_dependency_added_test.dart |
| @@ -5,6 +5,7 @@ |
| library pub_tests; |
| import 'dart:io'; |
| +import 'dart:json' as json; |
| import '../descriptor.dart' as d; |
| import '../test_pub.dart'; |
| @@ -12,23 +13,24 @@ import 'utils.dart'; |
| main() { |
| initConfig(); |
| - integration("responds with a 404 for a missing files in dependencies", () { |
| + integration("installs first if a dependency is not in the lock file", () { |
|
nweiz
2013/07/30 19:34:36
Test that it doesn't install if a dependency is re
Bob Nystrom
2013/07/30 21:35:32
Done.
|
| d.dir("foo", [ |
| - d.libPubspec("foo", "0.0.1") |
| + d.libPubspec("foo", "0.0.1"), |
| + d.libDir("foo") |
| ]).create(); |
| + // Create a pubspec with "foo" and a lock file without it. |
| d.dir(appPath, [ |
| d.appPubspec({ |
| "foo": {"path": "../foo"} |
| - }) |
| + }), |
| + d.file("pubspec.lock", json.stringify({ |
| + 'packages': {} |
| + })) |
|
nweiz
2013/07/30 19:34:36
I don't like coupling the tests to the specific lo
Bob Nystrom
2013/07/30 21:35:32
Done.
|
| ]).create(); |
| - pubInstall(); |
| - startPubServe(); |
| - requestShould404("packages/foo/nope.dart"); |
| - requestShould404("assets/foo/nope.png"); |
| - requestShould404("dir/packages/foo/nope.dart"); |
| - requestShould404("dir/assets/foo/nope.png"); |
| + startPubServe(shouldInstallFirst: true); |
| + requestShouldSucceed("packages/foo/foo.dart", 'main() => "foo";'); |
| endPubServe(); |
| }); |
| } |