diff --git a/Tests/Unit/MSFT_SqlRS.Tests.ps1 b/Tests/Unit/MSFT_SqlRS.Tests.ps1 index fc81927b9..5b3c8dc7f 100644 --- a/Tests/Unit/MSFT_SqlRS.Tests.ps1 +++ b/Tests/Unit/MSFT_SqlRS.Tests.ps1 @@ -375,7 +375,7 @@ try Assert-MockCalled -CommandName Invoke-RsCimMethod -ParameterFilter { $MethodName -eq 'InitializeReportServer' - } -Exactly -Times 0 -Scope It + } -Exactly -Times 1 -Scope It Assert-MockCalled -CommandName Invoke-RsCimMethod -ParameterFilter { $MethodName -eq 'SetDatabaseConnection' @@ -405,7 +405,7 @@ try $MethodName -eq 'ReserveUrl' -and $Arguments.Application -eq $mockReportsApplicationName } -Exactly -Times 1 -Scope It - Assert-MockCalled -CommandName Get-CimInstance -Exactly -Times 2 -Scope It + Assert-MockCalled -CommandName Get-CimInstance -Exactly -Times 3 -Scope It Assert-MockCalled -CommandName Invoke-Sqlcmd -Exactly -Times 2 -Scope It Assert-MockCalled -CommandName Restart-ReportingServicesService -Exactly -Times 1 -Scope It } @@ -657,7 +657,7 @@ try Assert-MockCalled -CommandName Invoke-RsCimMethod -ParameterFilter { $MethodName -eq 'InitializeReportServer' - } -Exactly -Times 0 -Scope It + } -Exactly -Times 1 -Scope It Assert-MockCalled -CommandName Invoke-RsCimMethod -ParameterFilter { $MethodName -eq 'SetDatabaseConnection' @@ -687,7 +687,7 @@ try $MethodName -eq 'ReserveUrl' -and $Arguments.Application -eq $mockReportsApplicationNameLegacy } -Exactly -Times 1 -Scope It - Assert-MockCalled -CommandName Get-CimInstance -Exactly -Times 2 -Scope It + Assert-MockCalled -CommandName Get-CimInstance -Exactly -Times 3 -Scope It Assert-MockCalled -CommandName Invoke-Sqlcmd -Exactly -Times 2 -Scope It Assert-MockCalled -CommandName Restart-ReportingServicesService -Exactly -Times 1 -Scope It }