From 9c31db9500d79f29c5e5e1419ab4f616a7a2ed88 Mon Sep 17 00:00:00 2001 From: Paul Nasrat Date: Wed, 8 Oct 2008 15:11:44 +0100 Subject: Add failing test for plugin with file and recurse --- spec/unit/network/handler/fileserver.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/unit/network/handler/fileserver.rb b/spec/unit/network/handler/fileserver.rb index cce00d333..4ba8e712d 100644 --- a/spec/unit/network/handler/fileserver.rb +++ b/spec/unit/network/handler/fileserver.rb @@ -36,6 +36,10 @@ describe Puppet::Network::Handler::FileServer do @mount.list("/aFile", false, "false").should == [["/", "file"]] end + it "should list a file within a directory when given the file path with recursion" do + @mount.list("/aFile", true, "false").should == [["/", "file"]] + end + it "should return nil for a non-existent path" do @mount.list("/no_such_file", false, false).should be(nil) end @@ -152,6 +156,10 @@ describe Puppet::Network::Handler::FileServer do @mount = Puppet::Network::Handler::FileServer::PluginMount.new(PLUGINS) @mount.allow("*") end + + it "should list a file within a directory when given the file path with recursion" do + @mount.list("facter/fact.rb", true, "false").should == [["/", "file"], ["/", "file"]] + end it "should return a merged view of all plugins for all modules" do list = @mount.list("facter",true,false) -- cgit