diff options
Diffstat (limited to 'spec/unit')
-rw-r--r-- | spec/unit/resource/macos_user_defaults_spec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/unit/resource/macos_user_defaults_spec.rb b/spec/unit/resource/macos_user_defaults_spec.rb index 1a222d0005..f0d1aa6a53 100644 --- a/spec/unit/resource/macos_user_defaults_spec.rb +++ b/spec/unit/resource/macos_user_defaults_spec.rb @@ -122,5 +122,10 @@ describe Chef::Resource::MacosUserDefaults do resource.value = false expect(provider.defaults_modify_cmd).to eql(["/usr/bin/defaults", "write", "NSGlobalDomain", "foo", "-bool", "FALSE"]) end + + it "autodetects dict type from Hash value and flattens keys & values" do + resource.value = { "foo" => "bar" } + expect(provider.defaults_modify_cmd).to eql(["/usr/bin/defaults", "write", "NSGlobalDomain", "foo", "-dict", "foo", "bar"]) + end end end |