Skip to content

Commit

Permalink
Install/Uninstall dont return anything
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanbergstrom committed Jan 29, 2024
1 parent a15cff5 commit 21b18a6
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/AnyPackage.Homebrew.Unit.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ Describe 'DSC-compliant package installation and uninstallation' {
$source = 'homebrew/core'
}

It 'searches for a specific version of a package' {
It 'searches for the latest version of a package' {
Find-Package -Name $package -Source $source | Where-Object {$_.Name -contains $package} | Should -Not -BeNullOrEmpty
}
It 'silently installs a specific version of a package' {
Install-Package -Name $package -Source $source | Where-Object {$_.Name -contains $package} | Should -Not -BeNullOrEmpty
It 'silently installs the latest version of a package' {
{Install-Package -Name $package -Source $source} | Should -Not -Throw
}
It 'finds the locally installed package just installed' {
Get-Package -Name $package | Where-Object {$_.Name -contains $package} | Should -Not -BeNullOrEmpty
Expand All @@ -51,11 +51,11 @@ Describe 'DSC-compliant package installation and uninstallation' {
$package = 'vlc'
}

It 'searches for a specific version of a package' {
It 'searches for the latest version of a package' {
Find-Package -Name $package | Where-Object {$_.Name -contains $package} | Should -Not -BeNullOrEmpty
}
It 'silently installs a specific version of a package' {
Install-Package -Name $package | Where-Object {$_.Name -contains $package} | Should -Not -BeNullOrEmpty
It 'silently installs the latest version of a package' {
{Install-Package -Name $package} | Should -Not -Throw
}
It 'finds the locally installed package just installed' {
Get-Package -Name $package | Where-Object {$_.Name -contains $package} | Should -Not -BeNullOrEmpty
Expand All @@ -74,10 +74,10 @@ Describe 'pipeline-based package installation and uninstallation' {
}

It 'searches for and silently installs the latest version of a package' {
Find-Package -Name $package -Source $source | Install-Package | Where-Object {$_.Name -contains $package} | Should -Not -BeNullOrEmpty
{Find-Package -Name $package -Source $source | Install-Package} | Should -Not -Throw
}
It 'finds and silently uninstalls the locally installed package just installed' {
Get-Package -Name $package | Uninstall-Package | Where-Object {$_.Name -contains $package} | Should -Not -BeNullOrEmpty
{Get-Package -Name $package | Uninstall-Package} | Should -Not -Throw
}
}
Context 'cask' {
Expand All @@ -86,10 +86,10 @@ Describe 'pipeline-based package installation and uninstallation' {
}

It 'searches for and silently installs the latest version of a package' {
Find-Package -Name $package | Install-Package | Where-Object {$_.Name -contains $package} | Should -Not -BeNullOrEmpty
{Find-Package -Name $package | Install-Package} | Should -Not -Throw
}
It 'finds and silently uninstalls the locally installed package just installed' {
Get-Package -Name $package | Uninstall-Package | Where-Object {$_.Name -contains $package} | Should -Not -BeNullOrEmpty
{Get-Package -Name $package | Uninstall-Package} | Should -Not -Throw
}
}
}
Expand Down

0 comments on commit 21b18a6

Please sign in to comment.