summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Higgins <pete@peterhiggins.org>2020-07-07 18:07:29 -0700
committerPete Higgins <pete@peterhiggins.org>2020-07-07 18:35:05 -0700
commit8227b7f1ab1bc7bf14815af3eafc08fe4b60b022 (patch)
treea6c2c2fe2ce1816a9a39ea9fde7086b5f8396fde
parent8a44ff88660219317cc3bdefe4c2e021660bdee4 (diff)
downloadchef-8227b7f1ab1bc7bf14815af3eafc08fe4b60b022.tar.gz
Update test for Windows package installer_type since the resource behavior changed.
Signed-off-by: Pete Higgins <pete@peterhiggins.org>
-rw-r--r--spec/unit/provider/package/windows_spec.rb6
-rw-r--r--spec/unit/resource/windows_package_spec.rb1
2 files changed, 4 insertions, 3 deletions
diff --git a/spec/unit/provider/package/windows_spec.rb b/spec/unit/provider/package/windows_spec.rb
index c52012b938..6df633d75d 100644
--- a/spec/unit/provider/package/windows_spec.rb
+++ b/spec/unit/provider/package/windows_spec.rb
@@ -233,9 +233,9 @@ describe Chef::Provider::Package::Windows, :windows_only do
end
end
- it "returns @installer_type if it is set" do
- provider.new_resource.installer_type(:downeaster)
- expect(provider.installer_type).to eql(:downeaster)
+ it "returns the resource's installer_type if it is set" do
+ provider.new_resource.installer_type(:nsis)
+ expect(provider.installer_type).to eql(:nsis)
end
it "sets installer_type to inno if the source contains inno" do
diff --git a/spec/unit/resource/windows_package_spec.rb b/spec/unit/resource/windows_package_spec.rb
index be199f39b2..cbe3a06d87 100644
--- a/spec/unit/resource/windows_package_spec.rb
+++ b/spec/unit/resource/windows_package_spec.rb
@@ -58,6 +58,7 @@ describe Chef::Resource::WindowsPackage, "initialize" do
expect { resource.installer_type :msi }.not_to raise_error
expect { resource.installer_type :nsis }.not_to raise_error
expect { resource.installer_type :wise }.not_to raise_error
+ expect { resource.installer_type :something_else_entirely }.to raise_error(Chef::Exceptions::ValidationFailed)
expect { resource.installer_type "msi" }.to raise_error(Chef::Exceptions::ValidationFailed)
end