diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-12-01 11:07:23 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-12-13 13:31:50 -0800 |
commit | 8cbf7dc6717ee4e83c277f8f2698cad5fd168773 (patch) | |
tree | e947e3f7505afdebe0c5a25f76362ed8d354e9d3 /spec/unit | |
parent | 79def53a87c29eb92a1f3db6bc7266d7e8049113 (diff) | |
download | chef-8cbf7dc6717ee4e83c277f8f2698cad5fd168773.tar.gz |
add flush_cache and fix yum's
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/unit')
-rw-r--r-- | spec/unit/resource/yum_package_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/unit/resource/yum_package_spec.rb b/spec/unit/resource/yum_package_spec.rb index dd0d3ae928..bc2d19d50e 100644 --- a/spec/unit/resource/yum_package_spec.rb +++ b/spec/unit/resource/yum_package_spec.rb @@ -65,6 +65,26 @@ describe Chef::Resource::YumPackage, "flush_cache" do @resource.flush_cache(flush_hash) expect(@resource.flush_cache).to eq(flush_hash) end + + it "should allow 'true' for flush_cache" do + @resource.flush_cache(true) + expect(@resource.flush_cache).to eq({ before: true, after: true }) + end + + it "should allow 'false' for flush_cache" do + @resource.flush_cache(false) + expect(@resource.flush_cache).to eq({ before: false, after: false }) + end + + it "should allow ':before' for flush_cache" do + @resource.flush_cache(:before) + expect(@resource.flush_cache).to eq({ before: true, after: false }) + end + + it "should allow ':after' for flush_cache" do + @resource.flush_cache(:after) + expect(@resource.flush_cache).to eq({ before: false, after: true }) + end end describe Chef::Resource::YumPackage, "allow_downgrade" do |