Skip to content

Commit fa7dd54

Browse files
added test case for SCIMUserName struct marshaling
1 parent 330d92d commit fa7dd54

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

github/scim_test.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,3 +389,23 @@ func TestSCIMUserAttributes_Marshal(t *testing.T) {
389389

390390
testJSONMarshal(t, u, want)
391391
}
392+
393+
func TestSCIMUserName_Marshal(t *testing.T) {
394+
testJSONMarshal(t, &SCIMUserName{}, `{
395+
"givenName":"","familyName":""
396+
}`)
397+
398+
u := &SCIMUserName{
399+
GivenName: "Name1",
400+
FamilyName: "Fname",
401+
Formatted: String("formatted name"),
402+
}
403+
404+
want := `{
405+
"givenName": "Name1",
406+
"familyName": "Fname",
407+
"formatted": "formatted name"
408+
}`
409+
410+
testJSONMarshal(t, u, want)
411+
}

0 commit comments

Comments
 (0)