summaryrefslogtreecommitdiff
path: root/spec/unit/provider/package
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2015-05-05 07:43:28 -0700
committerJay Mundrawala <jdmundrawala@gmail.com>2015-05-15 07:04:20 -0700
commit422e9a95df1c542f76c3060b48f4f7b0a99c531d (patch)
treeb6cf03d74f018ece40ae80acc3570ab7a04eead7 /spec/unit/provider/package
parent3b5beef887ad02f634b386713d406b77bb876d17 (diff)
downloadchef-422e9a95df1c542f76c3060b48f4f7b0a99c531d.tar.gz
Allow users to override remote_file attributes in windows_package
Diffstat (limited to 'spec/unit/provider/package')
-rw-r--r--spec/unit/provider/package/windows_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/unit/provider/package/windows_spec.rb b/spec/unit/provider/package/windows_spec.rb
index ab1ce103e0..345d7bd57f 100644
--- a/spec/unit/provider/package/windows_spec.rb
+++ b/spec/unit/provider/package/windows_spec.rb
@@ -76,6 +76,19 @@ describe Chef::Provider::Package::Windows, :windows_only do
end
it_behaves_like "a local file"
end
+
+ context "when remote_file_attributes are provided" do
+ let (:remote_file_attributes) { {:path => 'C:\\foobar.msi'} }
+ before(:each) do
+ new_resource.remote_file_attributes(remote_file_attributes)
+ end
+
+ it 'should override the attributes of the remote file resource used' do
+ expect(::File).to receive(:exists?).with(remote_file_attributes[:path])
+ provider.load_current_resource
+ end
+
+ end
end
context "when source is a local file" do