Skip to content

Commit

Permalink
Downgrade chocolatey to allow for v1 coverage (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanbergstrom authored Dec 3, 2023
1 parent 90896af commit 1ecc440
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/Foil.chocoV1.tests.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
Import-Module Foil

Describe "Chocolatey V1 test validity" {
BeforeAll {
$package = 'chocolatey'
$version = '1.4.0'
# Ensure an older verison of Chocolatey is present to provide for test coverage
choco upgrade $package --version $version --allow-downgrade
}
It 'confirms version of Chocolatey is below v2' {
Get-ChocoPackage -LocalOnly | Where-Object {$_.Name -eq $package -And $_.Version -lt '2.0.0'} | Should -Not -BeNullOrEmpty
}
}

Describe "Chocolatey V1 basic package search operations" {
Context 'without additional arguments' {
BeforeAll {
Expand Down

0 comments on commit 1ecc440

Please sign in to comment.