diff options
author | John McCrae <john.mccrae@progress.com> | 2021-09-25 22:42:31 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-25 22:42:31 -0700 |
commit | 14bc7c4607ea8f63ecafec16eeba8f500cee60e9 (patch) | |
tree | 00c8dd5ec1d54818d2e787c2090bf43766cbe95f /spec/functional | |
parent | c9d2bb862bdfffb9f56b148904b1a2b3f469adc4 (diff) | |
parent | 972b7152d360119897dee57ef5e380b61369650f (diff) | |
download | chef-14bc7c4607ea8f63ecafec16eeba8f500cee60e9.tar.gz |
Merge pull request #12029 from chef/jfm/powershell_package_source
Diffstat (limited to 'spec/functional')
-rw-r--r-- | spec/functional/resource/powershell_package_source_spec.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/spec/functional/resource/powershell_package_source_spec.rb b/spec/functional/resource/powershell_package_source_spec.rb index abc9dcabd1..1bf65cfb62 100644 --- a/spec/functional/resource/powershell_package_source_spec.rb +++ b/spec/functional/resource/powershell_package_source_spec.rb @@ -22,7 +22,7 @@ describe Chef::Resource::PowershellPackageSource, :windows_gte_10 do include Chef::Mixin::PowershellExec let(:source_name) { "fake" } - let(:url) { "https://www.nuget.org/api/v2" } + let(:source_location) { "https://www.nuget.org/api/v2" } let(:trusted) { true } let(:run_context) do @@ -32,7 +32,7 @@ describe Chef::Resource::PowershellPackageSource, :windows_gte_10 do subject do new_resource = Chef::Resource::PowershellPackageSource.new("test powershell package source", run_context) new_resource.source_name source_name - new_resource.url url + new_resource.source_location source_location new_resource.trusted trusted new_resource.provider_name provider_name new_resource @@ -61,7 +61,7 @@ describe Chef::Resource::PowershellPackageSource, :windows_gte_10 do it "updates an existing package source if changed" do subject.run_action(:register) subject.trusted !trusted - subject.run_action(:register) + subject.run_action(:set) expect(subject).to be_updated_by_last_action end end @@ -73,9 +73,8 @@ describe Chef::Resource::PowershellPackageSource, :windows_gte_10 do expect(get_installed_package_source_name).to be_empty end - it "does not unregister the package source if not already installed" do - subject.run_action(:unregister) - expect(subject).not_to be_updated_by_last_action + it "does not unregister the package source if not installed" do + expect { subject.run_action(:unregister) }.to_not raise_error end end end |