OLD | NEW |
(Empty) | |
| 1 import 'package:path/path.dart' as path; |
| 2 import 'package:scheduled_test/scheduled_test.dart'; |
| 3 import '../../lib/src/io.dart'; |
| 4 import '../descriptor.dart' as d; |
| 5 import '../test_pub.dart'; |
| 6 main() { |
| 7 initConfig(); |
| 8 integration("--dry-run shows report but does not apply changes", () { |
| 9 servePackages((builder) { |
| 10 builder.serve("foo", "1.0.0"); |
| 11 builder.serve("foo", "2.0.0"); |
| 12 }); |
| 13 d.appDir({ |
| 14 "foo": "2.0.0" |
| 15 }).create(); |
| 16 pubGet(); |
| 17 d.appDir({ |
| 18 "foo": "any" |
| 19 }).create(); |
| 20 schedule(() { |
| 21 deleteEntry(path.join(sandboxDir, appPath, "packages")); |
| 22 }); |
| 23 pubDowngrade( |
| 24 args: ["--dry-run"], |
| 25 output: allOf( |
| 26 [contains("< foo 1.0.0"), contains("Would change 1 dependency.")])); |
| 27 d.dir( |
| 28 appPath, |
| 29 [ |
| 30 d.matcherFile("pubspec.lock", contains("2.0.0")), |
| 31 d.nothing("packages")]).validate(); |
| 32 }); |
| 33 } |
OLD | NEW |