summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2015-05-05 12:09:39 -0700
committerJay Mundrawala <jdmundrawala@gmail.com>2015-05-05 12:09:39 -0700
commita39af0cb12682b44aa01c86a2d2ba21e1898c44f (patch)
tree22fa1465765fad6b29400465ff3a35a82608c0d5
parente4721a3e89e24614eebd6302e53b3b91d4535a92 (diff)
downloadchef-a39af0cb12682b44aa01c86a2d2ba21e1898c44f.tar.gz
Add specs for remote_file resource + windows network share
-rw-r--r--spec/unit/resource/remote_file_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/unit/resource/remote_file_spec.rb b/spec/unit/resource/remote_file_spec.rb
index 3731d1aee2..0b3df4eb2c 100644
--- a/spec/unit/resource/remote_file_spec.rb
+++ b/spec/unit/resource/remote_file_spec.rb
@@ -39,6 +39,11 @@ describe Chef::Resource::RemoteFile do
expect(Chef::Platform.find_provider(:noplatform, 'noversion', @resource)).to eq(Chef::Provider::RemoteFile)
end
+ it "says its provider is RemoteFile when the source is a network share" do
+ @resource.source("\\\\fakey\\fakerton\\fake.txt")
+ expect(@resource.provider).to eq(Chef::Provider::RemoteFile)
+ expect(Chef::Platform.find_provider(:noplatform, 'noversion', @resource)).to eq(Chef::Provider::RemoteFile)
+ end
describe "source" do
it "does not have a default value for 'source'" do
@@ -50,6 +55,11 @@ describe Chef::Resource::RemoteFile do
expect(@resource.source).to eql([ "http://opscode.com/" ])
end
+ it "should accept a windows network share source" do
+ @resource.source "\\\\fakey\\fakerton\\fake.txt"
+ expect(@resource.source).to eql([ "\\\\fakey\\fakerton\\fake.txt" ])
+ end
+
it "should accept a delayed evalutator (string) for the remote file source" do
@resource.source Chef::DelayedEvaluator.new {"http://opscode.com/"}
expect(@resource.source).to eql([ "http://opscode.com/" ])