Skip to content

Commit faf1bb5

Browse files
committed
(chocolatey#798) Add tests for install/upgrade pin parameter
Add specs for pin parameter for the install/upgrade commands
1 parent 49d17e2 commit faf1bb5

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

src/chocolatey.tests/infrastructure.app/commands/ChocolateyInstallCommandSpecs.cs

+18
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,24 @@ public void should_add_short_version_of_password_to_the_option_set()
235235
{
236236
optionSet.Contains("p").ShouldBeTrue();
237237
}
238+
239+
[Fact]
240+
public void should_add_pin_to_the_option_set()
241+
{
242+
optionSet.Contains("pinpackage").ShouldBeTrue();
243+
}
244+
245+
[Fact]
246+
public void should_add_long_version_of_pin_to_the_option_set()
247+
{
248+
optionSet.Contains("pin-package").ShouldBeTrue();
249+
}
250+
251+
[Fact]
252+
public void should_add_short_version_of_pin_to_the_option_set()
253+
{
254+
optionSet.Contains("pin").ShouldBeTrue();
255+
}
238256
}
239257

240258
public class when_handling_additional_argument_parsing : ChocolateyInstallCommandSpecsBase

src/chocolatey.tests/infrastructure.app/commands/ChocolateyUpgradeCommandSpecs.cs

+18
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,24 @@ public void should_add_short_version_of_password_to_the_option_set()
217217
{
218218
optionSet.Contains("p").ShouldBeTrue();
219219
}
220+
221+
[Fact]
222+
public void should_add_pin_to_the_option_set()
223+
{
224+
optionSet.Contains("pinpackage").ShouldBeTrue();
225+
}
226+
227+
[Fact]
228+
public void should_add_long_version_of_pin_to_the_option_set()
229+
{
230+
optionSet.Contains("pin-package").ShouldBeTrue();
231+
}
232+
233+
[Fact]
234+
public void should_add_short_version_of_pin_to_the_option_set()
235+
{
236+
optionSet.Contains("pin").ShouldBeTrue();
237+
}
220238
}
221239

222240
public class when_handling_additional_argument_parsing : ChocolateyUpgradeCommandSpecsBase

0 commit comments

Comments
 (0)