mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Ensure GetNetworkCredential() returns null if PSCredential has null or empty user name (#4697)
* GetNetworkCredential() returns null if PSCredential has empty user name * Fix test
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
Describe "Credential tests" -Tags "CI" {
|
||||
It "Explicit cast for an empty credential returns null" {
|
||||
# We should explicitly check that the expression returns $null
|
||||
[PSCredential]::Empty.GetNetworkCredential() | Should Be $null
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user