summaryrefslogtreecommitdiff
path: root/spec/unit/provider/package/chocolatey_spec.rb
diff options
context:
space:
mode:
authorMatt Wrock <matt@mattwrock.com>2016-05-27 17:28:16 -0700
committerMatt Wrock <matt@mattwrock.com>2016-05-27 17:28:16 -0700
commit6fd05d1bb24d7eab5a38f4dbba9bf108a5f5bd2b (patch)
treebc22db134e658dc939b00d0cd78eac056fd151ed /spec/unit/provider/package/chocolatey_spec.rb
parenta3a22771bef2acec5c325751622a47f733ee100c (diff)
downloadchef-6fd05d1bb24d7eab5a38f4dbba9bf108a5f5bd2b.tar.gz
fixes #4968 and only retrieves the latest version of packages from chocolateychoco_ar
Diffstat (limited to 'spec/unit/provider/package/chocolatey_spec.rb')
-rw-r--r--spec/unit/provider/package/chocolatey_spec.rb16
1 files changed, 1 insertions, 15 deletions
diff --git a/spec/unit/provider/package/chocolatey_spec.rb b/spec/unit/provider/package/chocolatey_spec.rb
index 8eaa69b598..8344c3d0ec 100644
--- a/spec/unit/provider/package/chocolatey_spec.rb
+++ b/spec/unit/provider/package/chocolatey_spec.rb
@@ -59,7 +59,7 @@ Git|2.6.2
munin-node|1.6.1.20130823
EOF
remote_list_obj = double(stdout: remote_list_stdout)
- allow(provider).to receive(:shell_out!).with("#{choco_exe} list -ar #{package_names.join ' '}#{args}", { timeout: timeout }).and_return(remote_list_obj)
+ allow(provider).to receive(:shell_out!).with("#{choco_exe} list -r #{package_names.join ' '}#{args}", { timeout: timeout }).and_return(remote_list_obj)
end
describe "#initialize" do
@@ -84,12 +84,6 @@ munin-node|1.6.1.20130823
expect(provider.candidate_version).to eql(["2.6.1"])
end
- it "should set the candidate_version to nill if pinning to bogus version" do
- allow_remote_list(["git"])
- new_resource.version("2.5.0")
- expect(provider.candidate_version).to eql([nil])
- end
-
it "should set the candidate_version to nil if there is no candidate" do
allow_remote_list(["vim"])
new_resource.package_name("vim")
@@ -301,14 +295,6 @@ munin-node|1.6.1.20130823
expect { provider.run_action(:install) }.to raise_error(Chef::Exceptions::Package)
end
- it "installing a package version that does not exist throws an error" do
- allow_remote_list(["git"])
- new_resource.package_name("git")
- new_resource.version("2.7.0")
- provider.load_current_resource
- expect { provider.run_action(:install) }.to raise_error(Chef::Exceptions::Package)
- end
-
it "installing multiple packages with a package that does not exist throws an error" do
allow_remote_list(["git", "package-does-not-exist"])
new_resource.package_name(["git", "package-does-not-exist"])