diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2015-08-19 19:13:30 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2015-08-25 09:57:00 -0700 |
commit | 9e398d9540c70e5a0bcaab554f3648055d97e8ba (patch) | |
tree | a5f8fcc45093d9e5d704dac0989c35129173053d /spec/unit/resource | |
parent | 16c56e408366e4af6bd469442342ecf597c5d9d9 (diff) | |
download | chef-9e398d9540c70e5a0bcaab554f3648055d97e8ba.tar.gz |
fix supports hash issues in service providers
- redhat provider now allows the user to override :status
- gentoo provider now allows the user to override :status and :restart
- service providers now dup the status hash and mutate their private
copy instead of mutating the new_resource
Diffstat (limited to 'spec/unit/resource')
-rw-r--r-- | spec/unit/resource/service_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/unit/resource/service_spec.rb b/spec/unit/resource/service_spec.rb index eb6f444e93..b9e3757255 100644 --- a/spec/unit/resource/service_spec.rb +++ b/spec/unit/resource/service_spec.rb @@ -1,7 +1,7 @@ # # Author:: AJ Christensen (<aj@hjksolutions.com>) # Author:: Tyler Cloke (<tyler@opscode.com>) -# Copyright:: Copyright (c) 2008 Opscode, Inc. +# Copyright:: Copyright (c) 2008-2015 Chef Software, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -139,14 +139,14 @@ describe Chef::Resource::Service do expect { @resource.send(attrib, "poop") }.to raise_error(ArgumentError) end - it "should default all the feature support to false" do - support_hash = { :status => false, :restart => false, :reload=> false } + it "should default all the feature support to nil" do + support_hash = { :status => nil, :restart => nil, :reload=> nil } expect(@resource.supports).to eq(support_hash) end it "should allow you to set what features this resource supports as a array" do support_array = [ :status, :restart ] - support_hash = { :status => true, :restart => true, :reload => false } + support_hash = { :status => true, :restart => true, :reload => nil } @resource.supports(support_array) expect(@resource.supports).to eq(support_hash) end |