diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-12 09:32:14 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-12 09:32:14 -0800 |
commit | 03eadde04eb219bfa8abe52d312261a5142e7266 (patch) | |
tree | b0864a3e70741f5a15f0337824f25b69fc319c07 /spec/unit | |
parent | 1e324f073455db7596f37da6bf21b2f6521529ce (diff) | |
download | chef-03eadde04eb219bfa8abe52d312261a5142e7266.tar.gz |
pull rubocop 0.37.2 into chefstyle
this is from the same ruleset that we had, but the new code catches more
conditions.
Diffstat (limited to 'spec/unit')
-rw-r--r-- | spec/unit/knife/core/node_editor_spec.rb | 10 | ||||
-rw-r--r-- | spec/unit/knife/core/ui_spec.rb | 8 | ||||
-rw-r--r-- | spec/unit/knife/node_show_spec.rb | 2 | ||||
-rw-r--r-- | spec/unit/node/attribute_spec.rb | 220 | ||||
-rw-r--r-- | spec/unit/provider/osx_profile_spec.rb | 84 | ||||
-rw-r--r-- | spec/unit/rest_spec.rb | 2 |
6 files changed, 163 insertions, 163 deletions
diff --git a/spec/unit/knife/core/node_editor_spec.rb b/spec/unit/knife/core/node_editor_spec.rb index 32ce402e19..abd034833c 100644 --- a/spec/unit/knife/core/node_editor_spec.rb +++ b/spec/unit/knife/core/node_editor_spec.rb @@ -43,7 +43,7 @@ describe Chef::Knife::NodeEditor do describe '#view' do it "returns a Hash with only the name, chef_environment, normal, " + - "policy_name, policy_group, and run_list properties" do + "policy_name, policy_group, and run_list properties" do expected = node_data.select do |key,| %w{ name chef_environment normal policy_name policy_group run_list }.include?(key) @@ -74,7 +74,7 @@ describe Chef::Knife::NodeEditor do expect(ui).to have_received(:warn) .with "Changing the name of a node results in a new node being " + - "created, test_node will not be modified or removed." + "created, test_node will not be modified or removed." expect(ui).to have_received(:confirm) .with("Proceed with creation of new node") @@ -123,7 +123,7 @@ describe Chef::Knife::NodeEditor do "override" => { "alpha" => { "bravo" => "foxtrot2", "delta" => "golf2" } }, "policy_name" => "mypolicy", "policy_group" => "prod", - "run_list" => %w{role[drama] recipe[mystery]}, + "run_list" => %w{role[drama] recipe[mystery]}, ) end @@ -159,7 +159,7 @@ describe Chef::Knife::NodeEditor do "override" => { "alpha" => { "bravo" => "foxtrot2", "delta" => "golf2" } }, "policy_name" => "mypolicy", "policy_group" => "prod", - "run_list" => %w{role[drama] recipe[mystery]}, + "run_list" => %w{role[drama] recipe[mystery]}, ) end @@ -189,7 +189,7 @@ describe Chef::Knife::NodeEditor do end it 'returns an array of property names that doesn\'t include ' + - "the non-editable properties" do + "the non-editable properties" do expect(subject.updated?).to eql %w{ normal policy_name policy_group run_list } end end diff --git a/spec/unit/knife/core/ui_spec.rb b/spec/unit/knife/core/ui_spec.rb index 37974821d7..eacca2af2e 100644 --- a/spec/unit/knife/core/ui_spec.rb +++ b/spec/unit/knife/core/ui_spec.rb @@ -352,19 +352,19 @@ EOM end it "should return multiple attributes" do - input = { "gi" => "go", "hi" => "ho", "id" => "sample-data-bag-item" } + input = { "gi" => "go", "hi" => "ho", "id" => "sample-data-bag-item" } @ui.config[:attribute] = %w{gi hi} expect(@ui.format_for_display(input)).to eq({ "sample-data-bag-item" => { "gi" => "go", "hi" => "ho" } }) end it "should handle attributes named the same as methods" do - input = { "keys" => "values", "hi" => "ho", "id" => "sample-data-bag-item" } + input = { "keys" => "values", "hi" => "ho", "id" => "sample-data-bag-item" } @ui.config[:attribute] = "keys" expect(@ui.format_for_display(input)).to eq({ "sample-data-bag-item" => { "keys" => "values" } }) end it "should handle nested attributes named the same as methods" do - input = { "keys" => { "keys" => "values" }, "hi" => "ho", "id" => "sample-data-bag-item" } + input = { "keys" => { "keys" => "values" }, "hi" => "ho", "id" => "sample-data-bag-item" } @ui.config[:attribute] = "keys.keys" expect(@ui.format_for_display(input)).to eq({ "sample-data-bag-item" => { "keys.keys" => "values" } }) end @@ -377,7 +377,7 @@ EOM end it "returns nil when given an attribute path that isn't a name or attribute" do - input = { "keys" => { "keys" => "values" }, "hi" => "ho", "id" => "sample-data-bag-item" } + input = { "keys" => { "keys" => "values" }, "hi" => "ho", "id" => "sample-data-bag-item" } non_existing_path = "nope.nada.nothingtoseehere" @ui.config[:attribute] = non_existing_path expect(@ui.format_for_display(input)).to eq({ "sample-data-bag-item" => { non_existing_path => nil } }) diff --git a/spec/unit/knife/node_show_spec.rb b/spec/unit/knife/node_show_spec.rb index b3fc78c954..2f684b27f4 100644 --- a/spec/unit/knife/node_show_spec.rb +++ b/spec/unit/knife/node_show_spec.rb @@ -34,7 +34,7 @@ describe Chef::Knife::NodeShow do end before(:each) do - Chef::Config[:node_name] = "webmonkey.example.com" + Chef::Config[:node_name] = "webmonkey.example.com" end describe "run" do diff --git a/spec/unit/node/attribute_spec.rb b/spec/unit/node/attribute_spec.rb index 7170f62efb..aaca47d951 100644 --- a/spec/unit/node/attribute_spec.rb +++ b/spec/unit/node/attribute_spec.rb @@ -28,114 +28,114 @@ describe Chef::Node::Attribute do "platform_version" => "10.5.7", "platform" => "mac_os_x", "ipaddress" => "192.168.0.117", - "network" => { "default_interface" => "en1", - "interfaces" => { "vmnet1" => { "flags" => %w{UP BROADCAST SMART RUNNING SIMPLEX MULTICAST}, - "number" => "1", - "addresses" => { "00:50:56:c0:00:01" => { "family" => "lladdr" }, - "192.168.110.1" => { "broadcast" => "192.168.110.255", - "netmask" => "255.255.255.0", - "family" => "inet" } }, - "mtu" => "1500", - "type" => "vmnet", - "arp" => { "192.168.110.255" => "ff:ff:ff:ff:ff:ff" }, - "encapsulation" => "Ethernet" }, - "stf0" => { "flags" => [], - "number" => "0", - "addresses" => {}, - "mtu" => "1280", - "type" => "stf", - "encapsulation" => "6to4" }, - "lo0" => { "flags" => %w{UP LOOPBACK RUNNING MULTICAST}, - "number" => "0", - "addresses" => { "::1" => { "scope" => "Node", "prefixlen" => "128", "family" => "inet6" }, - "127.0.0.1" => { "netmask" => "255.0.0.0", "family" => "inet" }, - "fe80::1" => { "scope" => "Link", "prefixlen" => "64", "family" => "inet6" } }, - "mtu" => "16384", - "type" => "lo", - "encapsulation" => "Loopback" }, - "gif0" => { "flags" => %w{POINTOPOINT MULTICAST}, - "number" => "0", - "addresses" => {}, - "mtu" => "1280", - "type" => "gif", - "encapsulation" => "IPIP" }, - "vmnet8" => { "flags" => %w{UP BROADCAST SMART RUNNING SIMPLEX MULTICAST}, - "number" => "8", - "addresses" => { "192.168.4.1" => { "broadcast" => "192.168.4.255", - "netmask" => "255.255.255.0", - "family" => "inet" }, - "00:50:56:c0:00:08" => { "family" => "lladdr" } }, - "mtu" => "1500", - "type" => "vmnet", - "arp" => { "192.168.4.255" => "ff:ff:ff:ff:ff:ff" }, - "encapsulation" => "Ethernet" }, - "en0" => { "status" => "inactive", - "flags" => %w{UP BROADCAST SMART RUNNING SIMPLEX MULTICAST}, - "number" => "0", - "addresses" => { "00:23:32:b0:32:f2" => { "family" => "lladdr" } }, - "mtu" => "1500", - "media" => { "supported" => { "autoselect" => { "options" => [] }, - "none" => { "options" => [] }, - "1000baseT" => { "options" => ["full-duplex", "flow-control", "hw-loopback"] }, - "10baseT/UTP" => { "options" => ["half-duplex", "full-duplex", "flow-control", "hw-loopback"] }, - "100baseTX" => { "options" => ["half-duplex", "full-duplex", "flow-control", "hw-loopback"] } }, - "selected" => { "autoselect" => { "options" => [] } } }, - "type" => "en", - "encapsulation" => "Ethernet" }, - "en1" => { "status" => "active", - "flags" => %w{UP BROADCAST SMART RUNNING SIMPLEX MULTICAST}, - "number" => "1", - "addresses" => { "fe80::223:6cff:fe7f:676c" => { "scope" => "Link", "prefixlen" => "64", "family" => "inet6" }, - "00:23:6c:7f:67:6c" => { "family" => "lladdr" }, - "192.168.0.117" => { "broadcast" => "192.168.0.255", - "netmask" => "255.255.255.0", - "family" => "inet" } }, - "mtu" => "1500", - "media" => { "supported" => { "autoselect" => { "options" => [] } }, - "selected" => { "autoselect" => { "options" => [] } } }, - "type" => "en", - "arp" => { "192.168.0.72" => "0:f:ea:39:fa:d5", - "192.168.0.1" => "0:1c:fb:fc:6f:20", - "192.168.0.255" => "ff:ff:ff:ff:ff:ff", - "192.168.0.3" => "0:1f:33:ea:26:9b", - "192.168.0.77" => "0:23:12:70:f8:cf", - "192.168.0.152" => "0:26:8:7d:2:4c" }, - "encapsulation" => "Ethernet" }, - "en2" => { "status" => "active", - "flags" => %w{UP BROADCAST SMART RUNNING SIMPLEX MULTICAST}, - "number" => "2", - "addresses" => { "169.254.206.152" => { "broadcast" => "169.254.255.255", - "netmask" => "255.255.0.0", - "family" => "inet" }, - "00:1c:42:00:00:01" => { "family" => "lladdr" }, - "fe80::21c:42ff:fe00:1" => { "scope" => "Link", "prefixlen" => "64", "family" => "inet6" } }, - "mtu" => "1500", - "media" => { "supported" => { "autoselect" => { "options" => [] } }, - "selected" => { "autoselect" => { "options" => [] } } }, - "type" => "en", - "encapsulation" => "Ethernet" }, - "fw0" => { "status" => "inactive", - "flags" => %w{BROADCAST SIMPLEX MULTICAST}, - "number" => "0", - "addresses" => { "00:23:32:ff:fe:b0:32:f2" => { "family" => "lladdr" } }, - "mtu" => "4078", - "media" => { "supported" => { "autoselect" => { "options" => ["full-duplex"] } }, - "selected" => { "autoselect" => { "options" => ["full-duplex"] } } }, - "type" => "fw", - "encapsulation" => "1394" }, - "en3" => { "status" => "active", - "flags" => %w{UP BROADCAST SMART RUNNING SIMPLEX MULTICAST}, - "number" => "3", - "addresses" => { "169.254.206.152" => { "broadcast" => "169.254.255.255", - "netmask" => "255.255.0.0", - "family" => "inet" }, - "00:1c:42:00:00:00" => { "family" => "lladdr" }, - "fe80::21c:42ff:fe00:0" => { "scope" => "Link", "prefixlen" => "64", "family" => "inet6" } }, - "mtu" => "1500", - "media" => { "supported" => { "autoselect" => { "options" => [] } }, - "selected" => { "autoselect" => { "options" => [] } } }, - "type" => "en", - "encapsulation" => "Ethernet" } } }, + "network" => { "default_interface" => "en1", + "interfaces" => { "vmnet1" => { "flags" => %w{UP BROADCAST SMART RUNNING SIMPLEX MULTICAST}, + "number" => "1", + "addresses" => { "00:50:56:c0:00:01" => { "family" => "lladdr" }, + "192.168.110.1" => { "broadcast" => "192.168.110.255", + "netmask" => "255.255.255.0", + "family" => "inet" } }, + "mtu" => "1500", + "type" => "vmnet", + "arp" => { "192.168.110.255" => "ff:ff:ff:ff:ff:ff" }, + "encapsulation" => "Ethernet" }, + "stf0" => { "flags" => [], + "number" => "0", + "addresses" => {}, + "mtu" => "1280", + "type" => "stf", + "encapsulation" => "6to4" }, + "lo0" => { "flags" => %w{UP LOOPBACK RUNNING MULTICAST}, + "number" => "0", + "addresses" => { "::1" => { "scope" => "Node", "prefixlen" => "128", "family" => "inet6" }, + "127.0.0.1" => { "netmask" => "255.0.0.0", "family" => "inet" }, + "fe80::1" => { "scope" => "Link", "prefixlen" => "64", "family" => "inet6" } }, + "mtu" => "16384", + "type" => "lo", + "encapsulation" => "Loopback" }, + "gif0" => { "flags" => %w{POINTOPOINT MULTICAST}, + "number" => "0", + "addresses" => {}, + "mtu" => "1280", + "type" => "gif", + "encapsulation" => "IPIP" }, + "vmnet8" => { "flags" => %w{UP BROADCAST SMART RUNNING SIMPLEX MULTICAST}, + "number" => "8", + "addresses" => { "192.168.4.1" => { "broadcast" => "192.168.4.255", + "netmask" => "255.255.255.0", + "family" => "inet" }, + "00:50:56:c0:00:08" => { "family" => "lladdr" } }, + "mtu" => "1500", + "type" => "vmnet", + "arp" => { "192.168.4.255" => "ff:ff:ff:ff:ff:ff" }, + "encapsulation" => "Ethernet" }, + "en0" => { "status" => "inactive", + "flags" => %w{UP BROADCAST SMART RUNNING SIMPLEX MULTICAST}, + "number" => "0", + "addresses" => { "00:23:32:b0:32:f2" => { "family" => "lladdr" } }, + "mtu" => "1500", + "media" => { "supported" => { "autoselect" => { "options" => [] }, + "none" => { "options" => [] }, + "1000baseT" => { "options" => ["full-duplex", "flow-control", "hw-loopback"] }, + "10baseT/UTP" => { "options" => ["half-duplex", "full-duplex", "flow-control", "hw-loopback"] }, + "100baseTX" => { "options" => ["half-duplex", "full-duplex", "flow-control", "hw-loopback"] } }, + "selected" => { "autoselect" => { "options" => [] } } }, + "type" => "en", + "encapsulation" => "Ethernet" }, + "en1" => { "status" => "active", + "flags" => %w{UP BROADCAST SMART RUNNING SIMPLEX MULTICAST}, + "number" => "1", + "addresses" => { "fe80::223:6cff:fe7f:676c" => { "scope" => "Link", "prefixlen" => "64", "family" => "inet6" }, + "00:23:6c:7f:67:6c" => { "family" => "lladdr" }, + "192.168.0.117" => { "broadcast" => "192.168.0.255", + "netmask" => "255.255.255.0", + "family" => "inet" } }, + "mtu" => "1500", + "media" => { "supported" => { "autoselect" => { "options" => [] } }, + "selected" => { "autoselect" => { "options" => [] } } }, + "type" => "en", + "arp" => { "192.168.0.72" => "0:f:ea:39:fa:d5", + "192.168.0.1" => "0:1c:fb:fc:6f:20", + "192.168.0.255" => "ff:ff:ff:ff:ff:ff", + "192.168.0.3" => "0:1f:33:ea:26:9b", + "192.168.0.77" => "0:23:12:70:f8:cf", + "192.168.0.152" => "0:26:8:7d:2:4c" }, + "encapsulation" => "Ethernet" }, + "en2" => { "status" => "active", + "flags" => %w{UP BROADCAST SMART RUNNING SIMPLEX MULTICAST}, + "number" => "2", + "addresses" => { "169.254.206.152" => { "broadcast" => "169.254.255.255", + "netmask" => "255.255.0.0", + "family" => "inet" }, + "00:1c:42:00:00:01" => { "family" => "lladdr" }, + "fe80::21c:42ff:fe00:1" => { "scope" => "Link", "prefixlen" => "64", "family" => "inet6" } }, + "mtu" => "1500", + "media" => { "supported" => { "autoselect" => { "options" => [] } }, + "selected" => { "autoselect" => { "options" => [] } } }, + "type" => "en", + "encapsulation" => "Ethernet" }, + "fw0" => { "status" => "inactive", + "flags" => %w{BROADCAST SIMPLEX MULTICAST}, + "number" => "0", + "addresses" => { "00:23:32:ff:fe:b0:32:f2" => { "family" => "lladdr" } }, + "mtu" => "4078", + "media" => { "supported" => { "autoselect" => { "options" => ["full-duplex"] } }, + "selected" => { "autoselect" => { "options" => ["full-duplex"] } } }, + "type" => "fw", + "encapsulation" => "1394" }, + "en3" => { "status" => "active", + "flags" => %w{UP BROADCAST SMART RUNNING SIMPLEX MULTICAST}, + "number" => "3", + "addresses" => { "169.254.206.152" => { "broadcast" => "169.254.255.255", + "netmask" => "255.255.0.0", + "family" => "inet" }, + "00:1c:42:00:00:00" => { "family" => "lladdr" }, + "fe80::21c:42ff:fe00:0" => { "scope" => "Link", "prefixlen" => "64", "family" => "inet6" } }, + "mtu" => "1500", + "media" => { "supported" => { "autoselect" => { "options" => [] } }, + "selected" => { "autoselect" => { "options" => [] } } }, + "type" => "en", + "encapsulation" => "Ethernet" } } }, "fqdn" => "latte.local", "ohai_time" => 1249065590.90391, "domain" => "local", @@ -551,11 +551,11 @@ describe Chef::Node::Attribute do "place" => {}, }, { - "one" => { "four" => "five" }, + "one" => { "four" => "five" }, "snakes" => "on a plane", }, { - "one" => { "six" => "seven" }, + "one" => { "six" => "seven" }, "snack" => "cookies", }, {}, diff --git a/spec/unit/provider/osx_profile_spec.rb b/spec/unit/provider/osx_profile_spec.rb index 260204f98b..f11fce49db 100644 --- a/spec/unit/provider/osx_profile_spec.rb +++ b/spec/unit/provider/osx_profile_spec.rb @@ -29,30 +29,30 @@ describe Chef::Provider::OsxProfile do let(:new_resource) { Chef::Resource::OsxProfile.new("Profile Test", run_context) } let(:provider) { Chef::Provider::OsxProfile.new(new_resource, run_context) } let(:all_profiles) do - { "_computerlevel" => [{ "ProfileDisplayName" => "Finder Settings", - "ProfileIdentifier" => "com.apple.finder", - "ProfileInstallDate" => "2015-11-08 23:15:21 +0000", - "ProfileItems" => [{ "PayloadContent" => { "PayloadContentManagedPreferences" => { "com.apple.finder" => { "Forced" => [{ "mcx_preference_settings" => { "ShowExternalHardDrivesOnDesktop" => false } }] } } }, - "PayloadDisplayName" => "Custom: (com.apple.finder)", - "PayloadIdentifier" => "com.apple.finder", - "PayloadType" => "com.apple.ManagedClient.preferences", - "PayloadUUID" => "a017048f-684b-4e81-baa3-43afe316d739", - "PayloadVersion" => 1 }], - "ProfileOrganization" => "Chef", - "ProfileRemovalDisallowed" => "false", - "ProfileType" => "Configuration", - "ProfileUUID" => "e2e09bef-e673-44a6-bcbe-ecb5f1c1b740", - "ProfileVerificationState" => "unsigned", - "ProfileVersion" => 1 }, + { "_computerlevel" => [{ "ProfileDisplayName" => "Finder Settings", + "ProfileIdentifier" => "com.apple.finder", + "ProfileInstallDate" => "2015-11-08 23:15:21 +0000", + "ProfileItems" => [{ "PayloadContent" => { "PayloadContentManagedPreferences" => { "com.apple.finder" => { "Forced" => [{ "mcx_preference_settings" => { "ShowExternalHardDrivesOnDesktop" => false } }] } } }, + "PayloadDisplayName" => "Custom: (com.apple.finder)", + "PayloadIdentifier" => "com.apple.finder", + "PayloadType" => "com.apple.ManagedClient.preferences", + "PayloadUUID" => "a017048f-684b-4e81-baa3-43afe316d739", + "PayloadVersion" => 1 }], + "ProfileOrganization" => "Chef", + "ProfileRemovalDisallowed" => "false", + "ProfileType" => "Configuration", + "ProfileUUID" => "e2e09bef-e673-44a6-bcbe-ecb5f1c1b740", + "ProfileVerificationState" => "unsigned", + "ProfileVersion" => 1 }, { "ProfileDisplayName" => "ScreenSaver Settings", "ProfileIdentifier" => "com.testprofile.screensaver", "ProfileInstallDate" => "2015-10-05 23:15:21 +0000", - "ProfileItems" => [{ "PayloadContent" => { "PayloadContentManagedPreferences" => { "com.apple.screensaver" => { "Forced" => [{ "mcx_preference_settings" => { "idleTime" => 0 } }] } } }, - "PayloadDisplayName" => "Custom: (com.apple.screensaver)", - "PayloadIdentifier" => "com.apple.screensaver", - "PayloadType" => "com.apple.ManagedClient.preferences", - "PayloadUUID" => "73fc30e0-1e57-0131-c32d-000c2944c110", - "PayloadVersion" => 1 }], + "ProfileItems" => [{ "PayloadContent" => { "PayloadContentManagedPreferences" => { "com.apple.screensaver" => { "Forced" => [{ "mcx_preference_settings" => { "idleTime" => 0 } }] } } }, + "PayloadDisplayName" => "Custom: (com.apple.screensaver)", + "PayloadIdentifier" => "com.apple.screensaver", + "PayloadType" => "com.apple.ManagedClient.preferences", + "PayloadUUID" => "73fc30e0-1e57-0131-c32d-000c2944c110", + "PayloadVersion" => 1 }], "ProfileOrganization" => "Chef", "ProfileRemovalDisallowed" => "false", "ProfileType" => "Configuration", @@ -185,30 +185,30 @@ describe Chef::Provider::OsxProfile do let(:provider) { Chef::Provider::OsxProfile.new(new_resource, run_context) } let(:current_resource) { Chef::Resource::OsxProfile.new("Profile Test") } let(:all_profiles) do - { "_computerlevel" => [{ "ProfileDisplayName" => "ScreenSaver Settings", - "ProfileIdentifier" => "com.apple.screensaver", - "ProfileInstallDate" => "2015-10-05 23:15:21 +0000", - "ProfileItems" => [{ "PayloadContent" => { "PayloadContentManagedPreferences" => { "com.apple.screensaver" => { "Forced" => [{ "mcx_preference_settings" => { "idleTime" => 0 } }] } } }, - "PayloadDisplayName" => "Custom: (com.apple.screensaver)", - "PayloadIdentifier" => "com.apple.screensaver", - "PayloadType" => "com.apple.ManagedClient.preferences", - "PayloadUUID" => "73fc30e0-1e57-0131-c32d-000c2944c108", - "PayloadVersion" => 1 }], - "ProfileOrganization" => "Chef", - "ProfileRemovalDisallowed" => "false", - "ProfileType" => "Configuration", - "ProfileUUID" => "1781fbec-3325-565f-9022-8aa28135c3cc", - "ProfileVerificationState" => "unsigned", - "ProfileVersion" => 1 }, + { "_computerlevel" => [{ "ProfileDisplayName" => "ScreenSaver Settings", + "ProfileIdentifier" => "com.apple.screensaver", + "ProfileInstallDate" => "2015-10-05 23:15:21 +0000", + "ProfileItems" => [{ "PayloadContent" => { "PayloadContentManagedPreferences" => { "com.apple.screensaver" => { "Forced" => [{ "mcx_preference_settings" => { "idleTime" => 0 } }] } } }, + "PayloadDisplayName" => "Custom: (com.apple.screensaver)", + "PayloadIdentifier" => "com.apple.screensaver", + "PayloadType" => "com.apple.ManagedClient.preferences", + "PayloadUUID" => "73fc30e0-1e57-0131-c32d-000c2944c108", + "PayloadVersion" => 1 }], + "ProfileOrganization" => "Chef", + "ProfileRemovalDisallowed" => "false", + "ProfileType" => "Configuration", + "ProfileUUID" => "1781fbec-3325-565f-9022-8aa28135c3cc", + "ProfileVerificationState" => "unsigned", + "ProfileVersion" => 1 }, { "ProfileDisplayName" => "ScreenSaver Settings", "ProfileIdentifier" => "com.testprofile.screensaver", "ProfileInstallDate" => "2015-10-05 23:15:21 +0000", - "ProfileItems" => [{ "PayloadContent" => { "PayloadContentManagedPreferences" => { "com.apple.screensaver" => { "Forced" => [{ "mcx_preference_settings" => { "idleTime" => 0 } }] } } }, - "PayloadDisplayName" => "Custom: (com.apple.screensaver)", - "PayloadIdentifier" => "com.apple.screensaver", - "PayloadType" => "com.apple.ManagedClient.preferences", - "PayloadUUID" => "73fc30e0-1e57-0131-c32d-000c2944c110", - "PayloadVersion" => 1 }], + "ProfileItems" => [{ "PayloadContent" => { "PayloadContentManagedPreferences" => { "com.apple.screensaver" => { "Forced" => [{ "mcx_preference_settings" => { "idleTime" => 0 } }] } } }, + "PayloadDisplayName" => "Custom: (com.apple.screensaver)", + "PayloadIdentifier" => "com.apple.screensaver", + "PayloadType" => "com.apple.ManagedClient.preferences", + "PayloadUUID" => "73fc30e0-1e57-0131-c32d-000c2944c110", + "PayloadVersion" => 1 }], "ProfileOrganization" => "Chef", "ProfileRemovalDisallowed" => "false", "ProfileType" => "Configuration", diff --git a/spec/unit/rest_spec.rb b/spec/unit/rest_spec.rb index 9e99a3e32f..ea3bd88023 100644 --- a/spec/unit/rest_spec.rb +++ b/spec/unit/rest_spec.rb @@ -327,7 +327,7 @@ describe Chef::REST do context "when configured to disable compression" do let(:rest) do allow(Net::HTTP).to receive(:new).and_return(http_client) - Chef::REST.new(base_url, nil, nil, :disable_gzip => true) + Chef::REST.new(base_url, nil, nil, :disable_gzip => true) end it "does not accept encoding gzip" do |