summaryrefslogtreecommitdiffstats
path: root/spec/unit
diff options
context:
space:
mode:
authorNigel Kersten <nigelk@google.com>2009-07-31 17:36:50 -0700
committerJames Turnbull <james@lovedthanlost.net>2009-08-04 07:53:29 +1000
commitcd224c6c9f5dedd27bb59822e240b5bae6202ab0 (patch)
treef3ca083c26fbbecbbdc089037ba68416dbf4ea2a /spec/unit
parent401a9ec546adab01afa1a62477010797bf6fb221 (diff)
downloadpuppet-cd224c6c9f5dedd27bb59822e240b5bae6202ab0.tar.gz
puppet-cd224c6c9f5dedd27bb59822e240b5bae6202ab0.tar.xz
puppet-cd224c6c9f5dedd27bb59822e240b5bae6202ab0.zip
Fixes #2464, #2457. Deprecate reportserver for report_server. Add report_port setting. Add tests.
Diffstat (limited to 'spec/unit')
-rwxr-xr-x[-rw-r--r--]spec/unit/indirector/report/rest.rb19
1 files changed, 18 insertions, 1 deletions
diff --git a/spec/unit/indirector/report/rest.rb b/spec/unit/indirector/report/rest.rb
index a51ebca2a..1f71eb357 100644..100755
--- a/spec/unit/indirector/report/rest.rb
+++ b/spec/unit/indirector/report/rest.rb
@@ -5,7 +5,24 @@ require File.dirname(__FILE__) + '/../../../spec_helper'
require 'puppet/indirector/report/rest'
describe Puppet::Transaction::Report::Rest do
- it "should be a sublcass of Puppet::Indirector::REST" do
+ it "should be a subclass of Puppet::Indirector::REST" do
Puppet::Transaction::Report::Rest.superclass.should equal(Puppet::Indirector::REST)
end
+
+ it "should use the :report_server setting in preference to :reportserver" do
+ Puppet.settings[:reportserver] = "reportserver"
+ Puppet.settings[:report_server] = "report_server"
+ Puppet::Transaction::Report::Rest.server.should == "report_server"
+ end
+
+ it "should use the :report_server setting in preference to :server" do
+ Puppet.settings[:server] = "server"
+ Puppet.settings[:report_server] = "report_server"
+ Puppet::Transaction::Report::Rest.server.should == "report_server"
+ end
+
+ it "should have a value for report_server and report_port" do
+ Puppet::Transaction::Report::Rest.server.should_not be_nil
+ Puppet::Transaction::Report::Rest.port.should_not be_nil
+ end
end