mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-14 05:39:11 +00:00
Respect -Shuffle:$false in Get-SecureRandom (#26460)
This commit is contained in:
1 parent
77f1d99568
commit
e741cecab3
1 file changed
+6
@@ -150,6 +150,12 @@ Describe "Get-SecureRandom" -Tags "CI" {
|
||||
$randomNumber | Should -BeIn 1, 2, 3, 5, 8, 13
|
||||
}
|
||||
|
||||
It "Should return a single random item when -Shuffle:`$false is used" {
|
||||
$randomNumber = Get-SecureRandom -InputObject 1, 2, 3, 5, 8, 13 -Shuffle:$false
|
||||
$randomNumber.Count | Should -Be 1
|
||||
$randomNumber | Should -BeIn 1, 2, 3, 5, 8, 13
|
||||
}
|
||||
|
||||
It "Should return for a string collection " {
|
||||
$randomNumber = Get-SecureRandom -InputObject "red", "yellow", "blue"
|
||||
$randomNumber | Should -Be ("red" -or "yellow" -or "blue")
|
||||
|
||||
Reference in new issue
Block a user