diff --git a/spec/defines/manage_site_spec.rb b/spec/defines/manage_site_spec.rb index cec64ba..6730595 100644 --- a/spec/defines/manage_site_spec.rb +++ b/spec/defines/manage_site_spec.rb @@ -33,7 +33,7 @@ it { should include_class('iis::param::powershell') } it { should contain_exec('CreateSite-myWebSite').with({ - 'command' => "#{powershell} -Command \"Import-Module WebAdministration; $id = (Get-WebSite | foreach {$_.id} | sort -Descending | select -first 1) + 1; New-WebSite -Name \\\"myWebSite\\\" -Port 1080 -IP 127.0.0.1 -HostHeader \\\"myHost.example.com\\\" -PhysicalPath \\\"C:\\inetpub\\wwwroot\\path\\\" -ApplicationPool \\\"myAppPool.example.com\\\" -Ssl:$false -ID $id \"", + 'command' => "#{powershell} -Command \"Import-Module WebAdministration; $id = (Get-WebSite | foreach {$_.id} | sort -Descending | select -first 1) + 1; New-WebSite -Name \\\"myWebSite\\\" -Port 1080 -IP 127.0.0.1 -HostHeader \\\"myHost.example.com\\\" -PhysicalPath \\\"C:\\inetpub\\wwwroot\\path\\\" -ApplicationPool \\\"myAppPool.example.com\\\" -Ssl:$false -ID $id \"", 'onlyif' => "#{powershell} -Command \"Import-Module WebAdministration; if((Test-Path \\\"IIS:\\Sites\\myWebSite\\\")) { exit 1 } else { exit 0 }\"", })} end @@ -97,4 +97,4 @@ 'onlyif' => "#{powershell} -Command \"Import-Module WebAdministration; if(!(Test-Path \\\"IIS:\\Sites\\myWebSite\\\")) { exit 1 } else { exit 0 }\"", })} end -end \ No newline at end of file +end