Skip to content

Commit

Permalink
(chocolateyGH-293) Upgrade all except test scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Rondeau committed Jun 27, 2015
1 parent b759ae3 commit a4522b3
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/chocolatey.tests.integration/scenarios/UpgradeAllScenarios.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,28 @@ public void should_skip_packages_without_upgrades()
installPackageResult.First().Value.Version.ShouldEqual("1.0.0");
}
}

[Concern(typeof(ChocolateyUpgradeCommand))]
public class when_upgrading_all_packages_with_except : ScenariosBase
{
public override void Because()
{
Configuration.UpgradeCommand.PackageNamesToSkip = "upgradepackage";
Results = Service.upgrade_run(Configuration);
}

[Fact]
public void should_report_for_all_non_skipped_packages()
{
Results.Count().ShouldEqual(1);
}

[Fact]
public void should_skip_packages_in_except_list()
{
var upgradePackageResult = Results.Where(x => x.Key == "upgradepackage").ToList();
upgradePackageResult.Count.ShouldEqual(0, "upgradepackage should not be in the results list");
}
}
}
}

0 comments on commit a4522b3

Please sign in to comment.