diff options
author | Tim Smith <tsmith@chef.io> | 2018-05-16 12:48:05 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-05-16 15:45:33 -0700 |
commit | 69687a927da48b169262e3b961fd2c12e6723574 (patch) | |
tree | a0744c8401a4ae32ed489c65a3cfd57d3b784b67 /spec/unit/resource/ips_package_spec.rb | |
parent | b69877bb0f1b2aec99f9c0a392d064e2b0d21bda (diff) | |
download | chef-69687a927da48b169262e3b961fd2c12e6723574.tar.gz |
Add additional resource specs
Auto generated from the resource inspector
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec/unit/resource/ips_package_spec.rb')
-rw-r--r-- | spec/unit/resource/ips_package_spec.rb | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/spec/unit/resource/ips_package_spec.rb b/spec/unit/resource/ips_package_spec.rb index b19f6bdf58..9ec27e914f 100644 --- a/spec/unit/resource/ips_package_spec.rb +++ b/spec/unit/resource/ips_package_spec.rb @@ -17,10 +17,8 @@ # require "spec_helper" -require "support/shared/unit/resource/static_provider_resolution" - -describe Chef::Resource::IpsPackage, "initialize" do +describe Chef::Resource::IpsPackage do static_provider_resolution( resource: Chef::Resource::IpsPackage, provider: Chef::Provider::Package::Ips, @@ -39,4 +37,18 @@ describe Chef::Resource::IpsPackage, "initialize" do resource.accept_license(true) expect(resource.accept_license).to eql(true) end + + it "sets the default action as :install" do + expect(resource.action).to eql([:install]) + end + + it "supports :install, :lock, :purge, :reconfig, :remove, :unlock, :upgrade actions" do + expect { resource.action :install }.not_to raise_error + expect { resource.action :lock }.not_to raise_error + expect { resource.action :purge }.not_to raise_error + expect { resource.action :reconfig }.not_to raise_error + expect { resource.action :remove }.not_to raise_error + expect { resource.action :unlock }.not_to raise_error + expect { resource.action :upgrade }.not_to raise_error + end end |