diff options
author | rishichawda <rishichawda@users.noreply.github.com> | 2021-10-07 10:57:16 +0530 |
---|---|---|
committer | rishichawda <rishichawda@users.noreply.github.com> | 2021-10-07 10:57:16 +0530 |
commit | f54b9937df95f50e4a26e70eb2292cb28aed5de6 (patch) | |
tree | 1a476ca701544f6973f2b7d063217b08ed8ca4aa /spec | |
parent | 842defaf8ec37e4b004865d171459686c46f359e (diff) | |
download | chef-f54b9937df95f50e4a26e70eb2292cb28aed5de6.tar.gz |
fix chefstyle errorsapi-based-macos-userdefaults
Signed-off-by: rishichawda <rishichawda@users.noreply.github.com>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/functional/resource/macos_userdefaults_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/functional/resource/macos_userdefaults_spec.rb b/spec/functional/resource/macos_userdefaults_spec.rb index 45dd655413..a9ed206019 100644 --- a/spec/functional/resource/macos_userdefaults_spec.rb +++ b/spec/functional/resource/macos_userdefaults_spec.rb @@ -64,7 +64,7 @@ describe Chef::Resource::MacosUserDefaults do resource.run_action(:write) expect(resource.get_preference resource).to eq([ "/Library/Managed Installs/fake.log", "/Library/Managed Installs/also_fake.log"]) end - + it "set dictionary value" do resource.domain "/Library/Preferences/ManagedInstalls" resource.key "TestDictionaryValues" @@ -72,13 +72,13 @@ describe Chef::Resource::MacosUserDefaults do resource.run_action(:write) expect(resource.get_preference resource).to eq("User" => "/Library/Managed Installs/way_fake.log") end - + it "set array of dictionaries" do resource.domain "/Library/Preferences/ManagedInstalls" resource.key "TestArrayWithDictionary" resource.value [ { "User": "/Library/Managed Installs/way_fake.log" } ] resource.run_action(:write) - expect(resource.get_preference resource).to eq([ { "User"=> "/Library/Managed Installs/way_fake.log" } ]) + expect(resource.get_preference resource).to eq([ { "User" => "/Library/Managed Installs/way_fake.log" } ]) end it "set boolean for preference value" do @@ -88,14 +88,14 @@ describe Chef::Resource::MacosUserDefaults do resource.run_action(:write) expect(resource.get_preference resource).to eq(true) end - + it "sets value to global domain when domain is not passed" do resource.key "TestKey" resource.value 1 resource.run_action(:write) expect(resource.get_preference resource).to eq(1) end - + it "short domain names" do resource.domain "com.apple.dock" resource.key "titlesize" @@ -108,12 +108,12 @@ describe Chef::Resource::MacosUserDefaults do it "we can delete a preference with full path" do resource.domain "/Library/Preferences/ManagedInstalls" resource.key "TestKey" - expect { resource.run_action(:delete) }. to_not raise_error + expect { resource.run_action(:delete) }. to_not raise_error end it "we can delete a preference with short name" do resource.domain "com.apple.dock" resource.key "titlesize" - expect { resource.run_action(:delete) }. to_not raise_error + expect { resource.run_action(:delete) }. to_not raise_error end end |