diff options
author | Luke Kanies <luke@madstop.com> | 2009-04-02 18:56:53 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2009-04-02 18:56:53 -0500 |
commit | 6e79cc00965a50c44f215fd1e553281cfd2b87c9 (patch) | |
tree | 56c496df9ad6ab66dfb16993910eb5ff1c34d065 /spec/unit/indirector/node/ldap.rb | |
parent | 62dad7a5f87f8d6285650ab1b727819db27cf2a7 (diff) | |
parent | c62c19370bfba881819c1a3d9da2f8e6fb52e5d9 (diff) | |
download | puppet-6e79cc00965a50c44f215fd1e553281cfd2b87c9.tar.gz puppet-6e79cc00965a50c44f215fd1e553281cfd2b87c9.tar.xz puppet-6e79cc00965a50c44f215fd1e553281cfd2b87c9.zip |
Merge branch '0.24.x'
Conflicts:
bin/ralsh
lib/puppet/executables/client/certhandler.rb
lib/puppet/parser/functions/versioncmp.rb
lib/puppet/parser/resource/reference.rb
lib/puppet/provider/augeas/augeas.rb
lib/puppet/provider/nameservice/directoryservice.rb
lib/puppet/provider/ssh_authorized_key/parsed.rb
lib/puppet/type.rb
lib/puppet/type/file/checksum.rb
spec/integration/defaults.rb
spec/integration/transaction/report.rb
spec/unit/executables/client/certhandler.rb
spec/unit/indirector/ssl_rsa/file.rb
spec/unit/node/catalog.rb
spec/unit/provider/augeas/augeas.rb
spec/unit/rails.rb
spec/unit/type/ssh_authorized_key.rb
spec/unit/type/tidy.rb
test/executables/filebucket.rb
test/executables/puppetbin.rb
Diffstat (limited to 'spec/unit/indirector/node/ldap.rb')
-rwxr-xr-x | spec/unit/indirector/node/ldap.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/unit/indirector/node/ldap.rb b/spec/unit/indirector/node/ldap.rb index ed8809e73..d407796c6 100755 --- a/spec/unit/indirector/node/ldap.rb +++ b/spec/unit/indirector/node/ldap.rb @@ -91,6 +91,26 @@ describe Puppet::Node::Ldap do @searcher.entry2hash(@entry)[:parameters]["foo"].should == "one" end + it "should convert 'true' values to the boolean 'true'" do + @entry.stubs(:to_hash).returns({"one" => ["true"]}) + @searcher.entry2hash(@entry)[:parameters]["one"].should == true + end + + it "should convert 'false' values to the boolean 'false'" do + @entry.stubs(:to_hash).returns({"one" => ["false"]}) + @searcher.entry2hash(@entry)[:parameters]["one"].should == false + end + + it "should convert 'true' values to the boolean 'true' inside an array" do + @entry.stubs(:to_hash).returns({"one" => ["true", "other"]}) + @searcher.entry2hash(@entry)[:parameters]["one"].should == [true, "other"] + end + + it "should convert 'false' values to the boolean 'false' inside an array" do + @entry.stubs(:to_hash).returns({"one" => ["false", "other"]}) + @searcher.entry2hash(@entry)[:parameters]["one"].should == [false, "other"] + end + it "should add the parent's name if present" do @entry.stubs(:vals).with("parentnode").returns(%w{foo}) @searcher.entry2hash(@entry)[:parent].should == "foo" |