Skip to content

Commit

Permalink
add test for validating backwards compatibility, missing from previou…
Browse files Browse the repository at this point in the history
…s commits
  • Loading branch information
jworkmanjc committed Aug 19, 2024
1 parent 4c0075c commit a598582
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,20 @@ Describe -Tag:('JCUser') "Set-JCUser - CustomAttributes 1.0" {
$match | Should -Be $true
Remove-JCUser -UserID $NewUser._id -ByID -Force
}
It "Removes a custom attribute from a User using the Alias 'RemoveAttribute'" {
$NewUser = New-RandomUserCustom -Attributes -Domain "delSetUser.$(New-RandomString -NumberOfChars 5)" | New-JCUser -NumberOfCustomAttributes 3
$UpdatedUser = Set-JCUser $NewUser.username -RemoveAttribute 'Department'
[int]$NewUserAttr = $NewUser.attributes.name.count
[int]$UpdatedUserAttr = $UpdatedUser.attributes.name.count
$UpdatedUserAttr++
$match = if ($NewUserAttr -eq $UpdatedUserAttr) {
$true
} else {
$false
}
$match | Should -Be $true
Remove-JCUser -UserID $NewUser._id -ByID -Force
}
}
Describe -Tag:('JCUser') 'Set-JCUser 1.3.0' {
# Linux UID, GUID
Expand Down

0 comments on commit a598582

Please sign in to comment.