Ensures resolved issue #1665 - Added RSpec test to ensure LDAP attributes get reset if no value is provided from remote.
This commit is contained in:
parent
13b763bfad
commit
66988facc1
1 changed files with 27 additions and 0 deletions
27
spec/lib/sequencer/unit/import/ldap/user/mapping_spec.rb
Normal file
27
spec/lib/sequencer/unit/import/ldap/user/mapping_spec.rb
Normal file
|
@ -0,0 +1,27 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.describe Sequencer::Unit::Import::Ldap::User::Mapping, sequencer: :unit do
|
||||
|
||||
it 'ensures to unset attribute value if none is provided' do
|
||||
|
||||
ldap_config = {
|
||||
user_attributes: {
|
||||
firstName: 'firstname',
|
||||
lastName: 'lastname',
|
||||
samaccountname: 'login',
|
||||
}
|
||||
}
|
||||
|
||||
resource = {
|
||||
samaccountname: 'Some41',
|
||||
firstName: 'Some',
|
||||
}
|
||||
|
||||
provided = process(
|
||||
ldap_config: ldap_config,
|
||||
resource: resource,
|
||||
)
|
||||
|
||||
expect(provided['lastname']).to be_nil
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue