Skip to content

Commit 763844f

Browse files
committed
Update UseShouldProcessForStateChangingFunctions.tests.ps1
Sorry. Pushed the wrong file. Corrected the message.
1 parent 446ab85 commit 763844f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Tests/Rules/UseShouldProcessForStateChangingFunctions.tests.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Import-Module PSScriptAnalyzer
2-
$violationMessage = "File AvoidConvertToSecureStringWithPlainText.ps1 uses ConvertTo-SecureString with plaintext. This will expose secure information. Encrypted standard strings should be used instead."
2+
$violationMessage = "Function ’Get-Service’ has verb that could change system state. Therefore, the function has to support 'ShouldProcess'"
3+
$violationName = "PSUseShouldProcessForStateChangingFunctions"
34
$violationName = "PS.UseShouldProcessForStateChangingFunctions"
45
$directory = Split-Path -Parent $MyInvocation.MyCommand.Path
56
$violations = Invoke-ScriptAnalyzer $directory\UseShouldProcessForStateChangingFunctions.ps1 | Where-Object {$_.RuleName -eq $violationName}
@@ -21,4 +22,4 @@ Describe "" {
2122
$noViolations.Count | Should Be 0
2223
}
2324
}
24-
}
25+
}

0 commit comments

Comments
 (0)