summaryrefslogtreecommitdiff
path: root/spec/functional/win32
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2018-07-02 10:27:03 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2018-07-02 10:27:03 -0700
commitdcac6762380d011f73cf53a50476d31dab0025ee (patch)
tree294fef3e2b4fea273c4bb11a086061872ed51598 /spec/functional/win32
parent35603c7ce1bd3ccf35334ed65152140f0ecaf080 (diff)
downloadchef-dcac6762380d011f73cf53a50476d31dab0025ee.tar.gz
fix Layout/IndentHeredoc
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/functional/win32')
-rw-r--r--spec/functional/win32/crypto_spec.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/spec/functional/win32/crypto_spec.rb b/spec/functional/win32/crypto_spec.rb
index 145c9881b9..5fcbca02b6 100644
--- a/spec/functional/win32/crypto_spec.rb
+++ b/spec/functional/win32/crypto_spec.rb
@@ -37,15 +37,15 @@ describe "Chef::ReservedNames::Win32::Crypto", :windows_only do
it "can be decrypted by powershell" do
encrypted = Chef::ReservedNames::Win32::Crypto.encrypt(plaintext)
resource = Chef::Resource::WindowsScript::PowershellScript.new("Powershell resource functional test", @run_context)
- resource.code <<-EOF
-$encrypted = '#{encrypted}' | ConvertTo-SecureString
-$BSTR = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($encrypted)
-$plaintext = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)
-if ($plaintext -ne '#{plaintext}') {
- Write-Error 'Got: ' $plaintext
- exit 1
-}
-exit 0
+ resource.code <<~EOF
+ $encrypted = '#{encrypted}' | ConvertTo-SecureString
+ $BSTR = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($encrypted)
+ $plaintext = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)
+ if ($plaintext -ne '#{plaintext}') {
+ Write-Error 'Got: ' $plaintext
+ exit 1
+ }
+ exit 0
EOF
resource.returns(0)
resource.run_action(:run)