Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensures resolved issue #1665 - Added RSpec test to ensure LDAP attrib…
…utes get reset if no value is provided from remote.
- Loading branch information
1 parent
13b763b
commit 66988fa
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |