File size: 669 Bytes
8c763fb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')]
param()
Describe "ConvertTo--SecureString" -Tags "CI" {
Context "Checking return types of ConvertTo--SecureString" {
It "Should return System.Security.SecureString after converting plaintext variable"{
#[SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Demo/doc/test secret.")]
$PesterTestConvert = (ConvertTo-SecureString "plaintextpester" -AsPlainText -Force)
$PesterTestConvert | Should -BeOfType securestring
}
}
}
|