diff options
author | Eike Waldt <waldt@b1-systems.de> | 2017-10-05 23:19:52 +0200 |
---|---|---|
committer | Eike Waldt <waldt@b1-systems.de> | 2017-10-06 07:44:01 +0200 |
commit | 0686c4db36735799664537aca636079950693c84 (patch) | |
tree | 01c3c56b8a3b9d2a61b51ab3a29b33e6265022a0 /spec | |
parent | 842193821084a5487d033f637aec7ff4d8720687 (diff) | |
download | chef-0686c4db36735799664537aca636079950693c84.tar.gz |
add allow_downgrade to zypper_package resource
Signed-off-by: Eike Waldt <waldt@b1-systems.de>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/provider/package/zypper_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/unit/provider/package/zypper_spec.rb b/spec/unit/provider/package/zypper_spec.rb index b20a548c73..598fedc9fa 100644 --- a/spec/unit/provider/package/zypper_spec.rb +++ b/spec/unit/provider/package/zypper_spec.rb @@ -140,6 +140,14 @@ describe Chef::Provider::Package::Zypper do provider.install_package(["emacs"], ["1.0"]) end + it "setting the property should allow downgrade" do + new_resource.allow_downgrade true + shell_out_expectation!( + "zypper", "--non-interactive", "install", "--auto-agree-with-licenses", "--oldpackage", "emacs=1.0" + ) + provider.install_package(["emacs"], ["1.0"]) + end + it "should add user provided options to the command" do new_resource.options "--user-provided" shell_out_expectation!( |