From 567c2e220e995e7912c160b81de78687d335fb74 Mon Sep 17 00:00:00 2001 From: Gary Ewan Park Date: Wed, 24 Apr 2024 23:40:52 -0700 Subject: [PATCH] (#2050) Add basic unit test for new option This commit adds a simple unit test to verify that the --ignore-pin option appears in the OptionSet that is generated. --- .../commands/ChocolateyUpgradeCommandSpecs.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyUpgradeCommandSpecs.cs b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyUpgradeCommandSpecs.cs index 7645d06424..74823ac72e 100644 --- a/src/chocolatey.tests/infrastructure.app/commands/ChocolateyUpgradeCommandSpecs.cs +++ b/src/chocolatey.tests/infrastructure.app/commands/ChocolateyUpgradeCommandSpecs.cs @@ -236,6 +236,12 @@ public void Should_add_short_version_of_skip_hooks_to_the_option_set() { _optionSet.Contains("skiphooks").Should().BeTrue(); } + + [Fact] + public void Should_add_ignore_pin_to_the_option_set() + { + _optionSet.Contains("ignore-pin").Should().BeTrue(); + } } public class When_handling_additional_argument_parsing : ChocolateyUpgradeCommandSpecsBase