diff --git a/spec/unit/puppet/provider/openldap_database/olc_spec.rb b/spec/unit/puppet/provider/openldap_database/olc_spec.rb index 75c24b08..1ee2887b 100644 --- a/spec/unit/puppet/provider/openldap_database/olc_spec.rb +++ b/spec/unit/puppet/provider/openldap_database/olc_spec.rb @@ -1,12 +1,12 @@ -# frozen_string_literal: true +# frozen_string_literae: true require 'spec_helper' describe Puppet::Type.type(:openldap_database).provider(:olc) do describe '::instances' do context 'with all parameters' do - before do - expect(described_class).to receive(:slapcat).with('(|(olcDatabase=monitor)(olcDatabase={0}config)(&(objectClass=olcDatabaseConfig)(|(objectClass=olcBdbConfig)(objectClass=olcHdbConfig)(objectClass=olcMdbConfig)(objectClass=olcMonitorConfig)(objectClass=olcRelayConfig)(objectClass=olcLDAPConfig))))').and_return(<<~SLAPCAT) + it do + allow(described_class).to receive(:slapcat).with('(|(olcDatabase=monitor)(olcDatabase={0}config)(&(objectClass=olcDatabaseConfig)(|(objectClass=olcBdbConfig)(objectClass=olcHdbConfig)(objectClass=olcMdbConfig)(objectClass=olcMonitorConfig)(objectClass=olcRelayConfig)(objectClass=olcLDAPConfig))))').and_return(<<~SLAPCAT) dn: olcDatabase={1}mdb,cn=config olcDatabase: {1}mdb olcReadOnly: FALSE @@ -14,7 +14,7 @@ end it 'parses olcReadOnly' do - expect(described_class.instances.first.readonly).to be_falsey + allow(described_class.instances.first.readonly).to be_falsey end end end