diff options
Diffstat (limited to 'spec')
-rwxr-xr-x | spec/unit/provider/user/ldap.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/unit/provider/user/ldap.rb b/spec/unit/provider/user/ldap.rb index c4731cbbb..eb13d8bbd 100755 --- a/spec/unit/provider/user/ldap.rb +++ b/spec/unit/provider/user/ldap.rb @@ -24,6 +24,16 @@ describe provider_class do provider_class.manager.rdn.should == :uid end + it "should be unsuitable if ldap is unavailable" do + Puppet.features.expects(:ldap?).returns false + provider_class.should_not be_suitable + end + + it "should be suitable if ldap is available" do + Puppet.features.expects(:ldap?).returns true + provider_class.should be_suitable + end + {:name => "uid", :password => "userPassword", :comment => "cn", |