Skip to content

Commit 8514c48

Browse files
committed
🧪 Add test for hashtable string fail
1 parent 445a699 commit 8514c48

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ModuleFast.tests.ps1

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,11 @@ Describe 'Get-ModuleFastPlan' -Tag 'E2E' {
252252

253253
)
254254

255+
It 'Fails if hashtable-style string parameter is not a modulespec' {
256+
{ Get-ModuleFastPlan '@{ModuleName = ''Az.Accounts''; ModuleVersion = ''2.7.3''; InvalidParameter = ''ThisShouldNotBeValid''}' -ErrorAction Stop }
257+
| Should -Throw '*Cannot process argument transformation on parameter*'
258+
}
259+
255260
It 'Gets Module with String Parameter: <Spec>' {
256261
$actual = Get-ModuleFastPlan $Spec
257262
$actual | Should -HaveCount 1

0 commit comments

Comments
 (0)