mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 20:56:02 +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:
1 parent
87db370a59
commit
58a296ed49
2 files changed
+12
No files matched your search
@@ -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