blob: 20b1b7ebda2581841cc9d63e2b2807a1eb4d3ede [file] [log] [blame]
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import '../../test_pub.dart';
main() {
initConfig();
integration('activates a different version after deactivating', () {
servePackages((builder) {
builder.serve("foo", "1.0.0");
builder.serve("foo", "2.0.0");
});
// Activate an old version.
schedulePub(args: ["global", "activate", "foo", "1.0.0"]);
schedulePub(args: ["global", "deactivate", "foo"],
output: "Deactivated package foo 1.0.0.");
// Activating again should forget the old version.
schedulePub(args: ["global", "activate", "foo"], output: """
Resolving dependencies...
+ foo 2.0.0
Downloading foo 2.0.0...
Activated foo 2.0.0.""");
});
}