summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Magnus Rakvåg <tor.magnus@outlook.com>2019-10-17 14:54:20 +0200
committerGitHub <noreply@github.com>2019-10-17 14:54:20 +0200
commit3c8d6816ed9471de1240d680588f556fd6cdb9d1 (patch)
tree5fb0a03652a63f38315446a98c7094b77669d7b0
parent87905fd6a95f47e3a6bbdc83aec835b65fe2ee2a (diff)
downloadchef-3c8d6816ed9471de1240d680588f556fd6cdb9d1.tar.gz
improve test case descriptions
Signed-off-by: Tor Magnus Rakvåg <tor.magnus@outlook.com> Co-Authored-By: Robb Kidd <robb@thekidds.org>
-rw-r--r--spec/unit/resource/windows_firewall_rule_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/resource/windows_firewall_rule_spec.rb b/spec/unit/resource/windows_firewall_rule_spec.rb
index bd2e6793c2..2e35fa18e1 100644
--- a/spec/unit/resource/windows_firewall_rule_spec.rb
+++ b/spec/unit/resource/windows_firewall_rule_spec.rb
@@ -302,7 +302,7 @@ describe Chef::Resource::WindowsFirewallRule do
expect(provider.firewall_command("New")).to eql("New-NetFirewallRule -Name 'test_rule' -DisplayName 'test_rule' -Description 'Firewall rule' -Direction 'inbound' -Protocol 'TCP' -Action 'allow' -Profile 'private' -InterfaceType 'any' -Enabled 'true'")
end
- it "sets multiple Profiles" do
+ it "sets multiple Profiles (must be comma-plus-space delimited for PowerShell to treat as an array)" do
resource.profile(%i{private public})
expect(provider.firewall_command("New")).to eql("New-NetFirewallRule -Name 'test_rule' -DisplayName 'test_rule' -Description 'Firewall rule' -Direction 'inbound' -Protocol 'TCP' -Action 'allow' -Profile 'private', 'public' -InterfaceType 'any' -Enabled 'true'")
end
@@ -371,7 +371,7 @@ describe Chef::Resource::WindowsFirewallRule do
expect(provider.firewall_command("Set")).to eql("Set-NetFirewallRule -Name 'test_rule' -Description 'Firewall rule' -LocalPort '80' -Direction 'inbound' -Protocol 'TCP' -Action 'allow' -Profile 'any' -InterfaceType 'any' -Enabled 'true'")
end
- it "sets multiple LocalPorts" do
+ it "sets multiple LocalPorts (must be comma-plus-space delimited for PowerShell to treat as an array)" do
resource.local_port(%w{80 8080})
expect(provider.firewall_command("Set")).to eql("Set-NetFirewallRule -Name 'test_rule' -Description 'Firewall rule' -LocalPort '80', '8080' -Direction 'inbound' -Protocol 'TCP' -Action 'allow' -Profile 'any' -InterfaceType 'any' -Enabled 'true'")
end
@@ -391,7 +391,7 @@ describe Chef::Resource::WindowsFirewallRule do
expect(provider.firewall_command("Set")).to eql("Set-NetFirewallRule -Name 'test_rule' -Description 'Firewall rule' -RemotePort '443' -Direction 'inbound' -Protocol 'TCP' -Action 'allow' -Profile 'any' -InterfaceType 'any' -Enabled 'true'")
end
- it "sets multiple RemotePorts" do
+ it "sets multiple RemotePorts (must be comma-plus-space delimited for PowerShell to treat as an array)" do
resource.remote_port(%w{443 445})
expect(provider.firewall_command("Set")).to eql("Set-NetFirewallRule -Name 'test_rule' -Description 'Firewall rule' -RemotePort '443', '445' -Direction 'inbound' -Protocol 'TCP' -Action 'allow' -Profile 'any' -InterfaceType 'any' -Enabled 'true'")
end