Skip to content

Commit

Permalink
Test case reproducing the issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
fisx committed Nov 21, 2024
1 parent aec65e3 commit a7923f8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/Spec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,19 @@ main = hspec $ do
actualSearchEntry `shouldBe` searchEntry
actualScimUser `shouldBe` expectedScimUser

it "helpful error message if scim userName (wire handle) field is missing" $ do
let displayName = "John Doe"
let userName = "jdoe"
let externalId = "jdoe@nodomain"
let email = "jdoe@nodomain"
let searchEntry =
searchEntryEmpty
& addAttr "displayName" displayName
& addAttr "email" email

conf <- Yaml.decodeThrow confYaml
ldapToScim conf searchEntry `shouldBe` Left []

searchEntryEmpty :: SearchEntry
searchEntryEmpty = SearchEntry (Dn "") []

Expand Down

0 comments on commit a7923f8

Please sign in to comment.