83
83
$violations.Count | Should Be 1
84
84
}
85
85
86
- It " finds no violation for 2 level downstream calls" {
86
+ It " finds violation for 2 level downstream calls" {
87
87
$scriptDef = @'
88
88
function Foo
89
89
{
@@ -143,7 +143,7 @@ function Foo
143
143
}
144
144
145
145
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 " {
147
147
$scriptDef = @'
148
148
function Remove-Foo {
149
149
[CmdletBinding(SupportsShouldProcess)]
@@ -158,7 +158,7 @@ function Remove-Foo {
158
158
$violations.Count | Should Be 0
159
159
}
160
160
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 " {
162
162
$scriptDef = @'
163
163
function Remove-Foo {
164
164
Param(
@@ -172,7 +172,7 @@ function Remove-Foo {
172
172
$violations.Count | Should Be 0
173
173
}
174
174
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 " {
176
176
$scriptDef = @'
177
177
function Install-Foo {
178
178
[CmdletBinding(SupportsShouldProcess)]
@@ -186,7 +186,7 @@ function Install-Foo {
186
186
$violations.Count | Should Be 0
187
187
}
188
188
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 " {
190
190
$scriptDef = @'
191
191
function Install-Foo {
192
192
Param(
0 commit comments