summaryrefslogtreecommitdiff
path: root/spec/functional
diff options
context:
space:
mode:
authordheerajd-msys <dheeraj.dubey@msystechnologies.com>2020-04-10 18:02:27 +0530
committerdheerajd-msys <dheeraj.dubey@msystechnologies.com>2020-04-14 18:29:29 +0530
commita439c4ac79391f0aab602fd394f99cbb70e2815d (patch)
tree3a4eb1d42ceb132b7d5f56df9ea649818bbc86d7 /spec/functional
parent41d57c58d0715718d7088ba3528665b4527c2154 (diff)
downloadchef-a439c4ac79391f0aab602fd394f99cbb70e2815d.tar.gz
update spec
Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
Diffstat (limited to 'spec/functional')
-rw-r--r--spec/functional/resource/msu_package_spec.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/functional/resource/msu_package_spec.rb b/spec/functional/resource/msu_package_spec.rb
index 0609c8d6ea..c49fe9499d 100644
--- a/spec/functional/resource/msu_package_spec.rb
+++ b/spec/functional/resource/msu_package_spec.rb
@@ -23,6 +23,7 @@ describe Chef::Resource::MsuPackage, :win2012r2_only do
let(:package_name) { "Package_for_KB2959977" }
let(:package_source) { "https://download.microsoft.com/download/3/B/3/3B320C07-B7B1-41E5-81F4-79EBC02DF7D3/Windows8.1-KB2959977-x64.msu" }
+ let(:package_identity) { "Package_for_KB2959977~31bf3856ad364e35~amd64~~6.3.1.1" }
let(:new_resource) { Chef::Resource::CabPackage.new("windows_test_pkg") }
let(:cab_provider) do
@@ -44,7 +45,7 @@ describe Chef::Resource::MsuPackage, :win2012r2_only do
it "installs the package successfully" do
subject.run_action(:install)
- found_packages = cab_provider.installed_packages.select { |p| p["package_identity"] =~ /^#{package_name}~/ }
+ found_packages = cab_provider.installed_packages.select { |p| p["package_identity"] == package_identity }
expect(found_packages.length).to be == 1
end
end
@@ -53,7 +54,7 @@ describe Chef::Resource::MsuPackage, :win2012r2_only do
it "removes an installed package" do
subject.run_action(:install)
remove_package
- found_packages = cab_provider.installed_packages.select { |p| p["package_identity"] =~ /^#{package_name}~/ }
+ found_packages = cab_provider.installed_packages.select { |p| p["package_identity"] == package_identity }
expect(found_packages.length).to be == 0
end
end