Files

18 lines
669 B
PowerShell
Raw Permalink Normal View History

# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingConvertToSecureStringWithPlainText', '')]
param()
2017-09-27 11:54:22 -07:00
Describe "ConvertTo--SecureString" -Tags "CI" {
2017-09-27 11:54:22 -07:00
Context "Checking return types of ConvertTo--SecureString" {
It "Should return System.Security.SecureString after converting plaintext variable"{
2017-09-27 11:54:22 -07:00
#[SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Demo/doc/test secret.")]
$PesterTestConvert = (ConvertTo-SecureString "plaintextpester" -AsPlainText -Force)
$PesterTestConvert | Should -BeOfType securestring
}
}
}