Skip to content

Commit a3f8460

Browse files
author
Kapil Borle
committed
Update test phrases for UseShouldProcess
1 parent 381763b commit a3f8460

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Tests/Rules/UseShouldProcessCorrectly.tests.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Foo
8383
$violations.Count | Should Be 1
8484
}
8585

86-
It "finds no violation for 2 level downstream calls" {
86+
It "finds violation for 2 level downstream calls" {
8787
$scriptDef = @'
8888
function Foo
8989
{
@@ -143,7 +143,7 @@ function Foo
143143
}
144144

145145
Context "When a builtin command that supports ShouldProcess is called" {
146-
It "finds no violation when caller declares SupportsShouldProcess and callee is a cmdlet" {
146+
It "finds no violation when caller declares SupportsShouldProcess and callee is a cmdlet with ShouldProcess" {
147147
$scriptDef = @'
148148
function Remove-Foo {
149149
[CmdletBinding(SupportsShouldProcess)]
@@ -158,7 +158,7 @@ function Remove-Foo {
158158
$violations.Count | Should Be 0
159159
}
160160

161-
It "finds no violation when caller does not declare SupportsShouldProcess and callee is a cmdlet" {
161+
It "finds no violation when caller does not declare SupportsShouldProcess and callee is a cmdlet with ShouldProcess" {
162162
$scriptDef = @'
163163
function Remove-Foo {
164164
Param(
@@ -172,7 +172,7 @@ function Remove-Foo {
172172
$violations.Count | Should Be 0
173173
}
174174

175-
It "finds no violation when caller declares SupportsShouldProcess and callee is a function" {
175+
It "finds no violation when caller declares SupportsShouldProcess and callee is a function with ShouldProcess" {
176176
$scriptDef = @'
177177
function Install-Foo {
178178
[CmdletBinding(SupportsShouldProcess)]
@@ -186,7 +186,7 @@ function Install-Foo {
186186
$violations.Count | Should Be 0
187187
}
188188

189-
It "finds no violation when caller does not declare SupportsShouldProcess and callee is a function" {
189+
It "finds no violation when caller does not declare SupportsShouldProcess and callee is a function with ShouldProcess" {
190190
$scriptDef = @'
191191
function Install-Foo {
192192
Param(

0 commit comments

Comments
 (0)