```ruby
require 'spec_helper'

describe 'nss_pam_ldapd::config' do
  context 'Red Hat defaults' do
    let(:facts) {{ :osfamily => 'RedHat' }}

    it { should contain_file('/etc/nslcd.conf').with({
        :mode => '0400',
        :owner => 'root',
        :group => 'root',
      })\
      .with_content(/^uri ldap:\/\/localhost$/)\
      .with_content(/^base dc=example,dc=com$/)\
      .with_content(/^ssl start_tls$/)\
    }
  end

  context 'non-default' do
    let(:facts) {{ :osfamily => 'RedHat' }}

    let(:params) do {
        :ldap => {
          'uris' => ['ldap://ldap1.example.com', 'ldap://ldap2.example.com' ],
          'basedn' => 'o=example org,c=us',
          'ssl' => 'broken',
          'tls_reqcert' => 'always',
        }
      }
    end

    it {
      should contain_file('/etc/nslcd.conf').with({
        :mode => '0400',
        :owner => 'root',
        :group => 'root',
      })\
      .with_content(/^uri ldap:\/\/ldap1\.example\.com ldap:\/\/ldap2\.example\.com$/)\
      .with_content(/^base o=example org,c=us$/)\
      .with_content(/^ssl broken$/)\
      .with_content(/^tls_reqcert always$/)
    }

  end
end
```

Remove checks of nslcd.conf contents
user
```ruby
require 'spec_helper'

describe 'nss_pam_ldapd::config' do
  context 'Red Hat defaults' do
    let(:facts) {{ :osfamily => 'RedHat' }}

    it { should contain_file('/etc/nslcd.conf').with({
        :mode => '0400',
        :owner => 'root',
        :group => 'root',
      })
    }

    }
  end

  context 'non-default' do
    let(:facts) {{ :osfamily => 'RedHat' }}

    let(:params) do {
        :ldap => {
          'uris' => ['ldap://ldap1.example.com', 'ldap://ldap2.example.com' ],
          'basedn' => 'o=example org,c=us',
          'ssl' => 'broken',
          'tls_reqcert' => 'always',
        }
      }
    end

    it { should contain_file('/etc/nslcd.conf') \
        .with_mode('0400')  \
        .with_owner('root') \
        .with_group('root')
    }

  end
end
```
assistant