Chromium Code Reviews| Index: utils/tests/pub/pub_lish_test.dart |
| =================================================================== |
| --- utils/tests/pub/pub_lish_test.dart (revision 18263) |
| +++ utils/tests/pub/pub_lish_test.dart (working copy) |
| @@ -81,9 +81,9 @@ |
| // test that "pub lish" chooses the correct files to publish. |
| integration('package validation has an error', () { |
| - var package = package("test_pkg", "1.0.0"); |
| - package.remove("homepage"); |
| - dir(appPath, [pubspec(package)]).scheduleCreate(); |
| + var pkg = package("test_pkg", "1.0.0"); |
| + pkg.remove("homepage"); |
| + dir(appPath, [pubspec(pkg)]).scheduleCreate(); |
| var server = new ScheduledServer(); |
| var pub = startPubLish(server); |
| @@ -94,10 +94,27 @@ |
| "published yet.")); |
| }); |
| + integration('preview package validation has a warning', () { |
|
nweiz
2013/02/09 00:20:50
It would be good to test the no-warnings case as w
keertip
2013/02/09 00:53:40
Done.
|
| + var pkg = package("test_pkg", "1.0.0"); |
| + pkg["author"] = "Nathan Weizenbaum"; |
| + dir(appPath, [pubspec(pkg)]).scheduleCreate(); |
| + |
| + var server = new ScheduledServer(); |
| + var lishArgs = new List(); |
| + lishArgs.add("--preview"); |
| + var pub = startPubLish(server,args: lishArgs); |
| + |
| + pub.shouldExit(0); |
| + expectLater(pub.remainingStderr(), |
| + contains('Suggestions:\n* Author "Nathan Weizenbaum" in pubspec.yaml should have an email address\n' |
|
nweiz
2013/02/09 00:20:50
Line length
keertip
2013/02/09 00:53:40
Done.
|
| + ' (e.g. "name <email>").\n\n' |
| + 'Package has 1 warnings.')); |
| + }); |
| + |
| integration('package validation has a warning and is canceled', () { |
| - var package = package("test_pkg", "1.0.0"); |
| - package["author"] = "Nathan Weizenbaum"; |
| - dir(appPath, [pubspec(package)]).scheduleCreate(); |
| + var pkg = package("test_pkg", "1.0.0"); |
| + pkg["author"] = "Nathan Weizenbaum"; |
| + dir(appPath, [pubspec(pkg)]).scheduleCreate(); |
| var server = new ScheduledServer(); |
| var pub = startPubLish(server); |
| @@ -108,9 +125,9 @@ |
| }); |
| integration('package validation has a warning and continues', () { |
| - var package = package("test_pkg", "1.0.0"); |
| - package["author"] = "Nathan Weizenbaum"; |
| - dir(appPath, [pubspec(package)]).scheduleCreate(); |
| + var pkg = package("test_pkg", "1.0.0"); |
| + pkg["author"] = "Nathan Weizenbaum"; |
| + dir(appPath, [pubspec(pkg)]).scheduleCreate(); |
| var server = new ScheduledServer(); |
| credentialsFile(server, 'access token').scheduleCreate(); |