2018-02-13 09:23:53 -08:00
|
|
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
|
|
# Licensed under the MIT License.
|
2017-09-27 11:54:22 -07:00
|
|
|
Describe "ConvertTo--SecureString" -Tags "CI" {
|
2015-11-11 15:23:48 +00:00
|
|
|
|
2017-09-27 11:54:22 -07:00
|
|
|
Context "Checking return types of ConvertTo--SecureString" {
|
2015-11-11 15:23:48 +00:00
|
|
|
|
2016-03-04 14:52:27 -08:00
|
|
|
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.")]
|
2016-03-04 14:52:27 -08:00
|
|
|
$PesterTestConvert = (ConvertTo-SecureString "plaintextpester" -AsPlainText -force)
|
2018-03-23 10:26:23 -07:00
|
|
|
$PesterTestConvert | Should -BeOfType securestring
|
2015-11-11 15:23:48 +00:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|