summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Schaumburg <pschaumburg@tecracer.de>2020-03-27 08:16:08 +0100
committerPatrick Schaumburg <pschaumburg@tecracer.de>2020-03-27 08:16:08 +0100
commit7d8c77a321114cc7d9f56dc7be582668548c20a5 (patch)
treee1f188220f64031a11501a8c44eff8e2df873c42
parent2d3355e6ad0a0ad3f8371555fff7c8aa5b6049c6 (diff)
downloadchef-7d8c77a321114cc7d9f56dc7be582668548c20a5.tar.gz
fix wrong property names again in tests
-rw-r--r--spec/unit/resource/windows_firewall_rule_spec.rb16
1 files changed, 3 insertions, 13 deletions
diff --git a/spec/unit/resource/windows_firewall_rule_spec.rb b/spec/unit/resource/windows_firewall_rule_spec.rb
index bcbcafe550..f929216a66 100644
--- a/spec/unit/resource/windows_firewall_rule_spec.rb
+++ b/spec/unit/resource/windows_firewall_rule_spec.rb
@@ -132,12 +132,12 @@ describe Chef::Resource::WindowsFirewallRule do
it "the icmp_type property accepts strings" do
resource.icmp_type("Any")
- expect(resource.protocol).to eql("Any")
+ expect(resource.icmp_type).to eql("Any")
end
it "the icmp_type property accepts integers" do
resource.icmp_type(8)
- expect(resource.protocol).to eql(8)
+ expect(resource.icmp_type).to eql(8)
end
it "the firewall_action property accepts :allow, :block and :notconfigured" do
@@ -264,7 +264,7 @@ describe Chef::Resource::WindowsFirewallRule do
it "sets a group" do
resource.group("New groupname")
- expect(provider.firewall_command("New")).to eql("New-NetFirewallRule -Name 'test_rule' -DisplayName 'New displayname' -Group 'New groupname' -Direction 'inbound' -Protocol 'TCP' -IcmpType 'Any' -Action 'allow' -Profile 'any' -InterfaceType 'any' -Enabled 'true'")
+ expect(provider.firewall_command("New")).to eql("New-NetFirewallRule -Name 'test_rule' -DisplayName 'test_rule' -Group 'New groupname' -Direction 'inbound' -Protocol 'TCP' -IcmpType 'Any' -Action 'allow' -Profile 'any' -InterfaceType 'any' -Enabled 'true'")
end
it "sets LocalAddress" do
@@ -395,16 +395,6 @@ describe Chef::Resource::WindowsFirewallRule do
expect(provider.firewall_command("Set")).to eql("Set-NetFirewallRule -Name 'test_rule' -NewDisplayName 'test_rule' -Description 'New description' -Direction 'inbound' -Protocol 'TCP' -IcmpType 'Any' -Action 'allow' -Profile 'any' -InterfaceType 'any' -Enabled 'true'")
end
- it "sets a group" do
- resource.group("New groupname")
- expect(provider.firewall_command("Set")).to eql("New-NetFirewallRule -Name 'test_rule' -DisplayName 'New displayname' -Group 'New groupname' -Direction 'inbound' -Protocol 'TCP' -IcmpType 'Any' -Action 'allow' -Profile 'any' -InterfaceType 'any' -Enabled 'true'")
- end
-
- it "sets a group" do
- resource.displayname("New groupname")
- expect(provider.firewall_command("Set")).to eql("New-NetFirewallRule -Name 'test_rule' -DisplayName 'New displayname' -Direction 'inbound' -Protocol 'TCP' -IcmpType 'Any' -Action 'allow' -Profile 'any' -InterfaceType 'any' -Enabled 'true'")
- end
-
it "sets LocalAddress" do
resource.local_address("127.0.0.1")
expect(provider.firewall_command("Set")).to eql("Set-NetFirewallRule -Name 'test_rule' -NewDisplayName 'test_rule' -LocalAddress '127.0.0.1' -Direction 'inbound' -Protocol 'TCP' -IcmpType 'Any' -Action 'allow' -Profile 'any' -InterfaceType 'any' -Enabled 'true'")