Skip to content

Commit

Permalink
Fixes compatibility issue with the latest version of Pester ("Allow a…
Browse files Browse the repository at this point in the history
…liases in Parameter Filters blocks." feature).
  • Loading branch information
fcabralpacheco committed Mar 30, 2019
1 parent de4298c commit 4030b4a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/Update-Package.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -213,24 +213,24 @@ Describe 'Update-Package' -Tag update {

It 'sets Force parameter from global variable au_Force if it is not bound' {
$global:au_Force = $true
$msg = "Parameter Force set from global variable au_Force: $au_Force"
$filter_msg = "Parameter Force set from global variable au_Force: $au_Force"
update -Verbose
Assert-MockCalled Write-Verbose -ParameterFilter { $Message -eq $msg }
Assert-MockCalled Write-Verbose -ParameterFilter { $Message -eq $filter_msg }

}

It "doesn't set Force parameter from global variable au_Force if it is bound" {
$global:au_Force = $true
$msg = "Parameter Force set from global variable au_Force: $au_Force"
$filter_msg = "Parameter Force set from global variable au_Force: $au_Force"
update -Verbose -Force:$false
Assert-MockCalled Write-Verbose -ParameterFilter { $Message -ne $msg }
Assert-MockCalled Write-Verbose -ParameterFilter { $Message -ne $filter_msg }
}

It 'sets Timeout parameter from global variable au_Timeout if it is not bound' {
$global:au_Timeout = 50
$msg = "Parameter Timeout set from global variable au_Timeout: $au_Timeout"
$filter_msg = "Parameter Timeout set from global variable au_Timeout: $au_Timeout"
update -Verbose
Assert-MockCalled Write-Verbose -ParameterFilter { $Message -eq $msg }
Assert-MockCalled Write-Verbose -ParameterFilter { $Message -eq $filter_msg }
}

}
Expand Down

0 comments on commit 4030b4a

Please sign in to comment.