summaryrefslogtreecommitdiffstats
path: root/spec/unit/indirector
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-03-13 18:23:04 -0500
committerJames Turnbull <james@lovedthanlost.net>2009-03-20 18:27:08 +1100
commitb6116fe28d9c771dbe2dcded539bcf30eea552a3 (patch)
treef75130ab70354a266f860e772b20e31bbd9fe289 /spec/unit/indirector
parent15740fe090365a81202fd44244e88b976f1d14d7 (diff)
downloadpuppet-b6116fe28d9c771dbe2dcded539bcf30eea552a3.tar.gz
puppet-b6116fe28d9c771dbe2dcded539bcf30eea552a3.tar.xz
puppet-b6116fe28d9c771dbe2dcded539bcf30eea552a3.zip
Requests now use default environment when none is specified
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit/indirector')
-rwxr-xr-xspec/unit/indirector/request.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/unit/indirector/request.rb b/spec/unit/indirector/request.rb
index e2edc2641..241f5f9fc 100755
--- a/spec/unit/indirector/request.rb
+++ b/spec/unit/indirector/request.rb
@@ -195,6 +195,10 @@ describe Puppet::Indirector::Request do
Puppet::Indirector::Request.new(:myind, :find, "my key", :environment => env).environment.should equal(env)
end
+ it "should use the default environment when none is provided" do
+ Puppet::Indirector::Request.new(:myind, :find, "my key" ).environment.should equal(Puppet::Node::Environment.new)
+ end
+
describe "when building a query string from its options" do
before do
@request = Puppet::Indirector::Request.new(:myind, :find, "my key")