diff options
author | snehaldwivedi <sdwivedi@msystechnologies.com> | 2021-09-01 04:55:18 -0700 |
---|---|---|
committer | snehaldwivedi <sdwivedi@msystechnologies.com> | 2021-10-07 02:18:34 -0700 |
commit | 362f710fe382e78e26acd3174e9077d4a4c4e9e1 (patch) | |
tree | bd454c1cbfcef34afb6c6e2a9016804abd54de53 /spec/unit | |
parent | 354b540a581eafb0c210494500b33961e606c835 (diff) | |
download | chef-362f710fe382e78e26acd3174e9077d4a4c4e9e1.tar.gz |
Updated review changes
Signed-off-by: snehaldwivedi <sdwivedi@msystechnologies.com>
Diffstat (limited to 'spec/unit')
-rw-r--r-- | spec/unit/provider/package/dpkg_spec.rb | 4 | ||||
-rw-r--r-- | spec/unit/resource/dpkg_package_spec.rb | 12 |
2 files changed, 12 insertions, 4 deletions
diff --git a/spec/unit/provider/package/dpkg_spec.rb b/spec/unit/provider/package/dpkg_spec.rb index e933b7c59d..318b91c77e 100644 --- a/spec/unit/provider/package/dpkg_spec.rb +++ b/spec/unit/provider/package/dpkg_spec.rb @@ -311,8 +311,4 @@ describe Chef::Provider::Package::Dpkg do let(:preseed_path) { "/preseed--wget--wget-1.11.4.seed" } end end - - it "allows you to specify whether allow_downgrade is true or false" do - expect(new_resource.allow_downgrade).to eq(false) - end end diff --git a/spec/unit/resource/dpkg_package_spec.rb b/spec/unit/resource/dpkg_package_spec.rb index acd879597d..9ff752f11e 100644 --- a/spec/unit/resource/dpkg_package_spec.rb +++ b/spec/unit/resource/dpkg_package_spec.rb @@ -57,4 +57,16 @@ describe Chef::Resource::DpkgPackage, "initialize" do end end + describe Chef::Resource::DpkgPackage, "allow_downgrade" do + before(:each) do + @resource = Chef::Resource::DpkgPackage.new("fakey_fakerton") + end + + it "should allow you to specify whether allow_downgrade is true or false" do + expect { @resource.allow_downgrade true }.not_to raise_error + expect { @resource.allow_downgrade false }.not_to raise_error + expect { @resource.allow_downgrade "something" }.to raise_error(ArgumentError) + end + end + end |