Skip to content

Commit

Permalink
Add test case for JSON resource marshaling (#2526)
Browse files Browse the repository at this point in the history
  • Loading branch information
vaibhavgholap23 committed Oct 25, 2022
1 parent 914d25e commit d17bf21
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions github/scim_test.go
Expand Up @@ -389,3 +389,23 @@ func TestSCIMUserAttributes_Marshal(t *testing.T) {

testJSONMarshal(t, u, want)
}

func TestSCIMUserName_Marshal(t *testing.T) {
testJSONMarshal(t, &SCIMUserName{}, `{
"givenName":"","familyName":""
}`)

u := &SCIMUserName{
GivenName: "Name1",
FamilyName: "Fname",
Formatted: String("formatted name"),
}

want := `{
"givenName": "Name1",
"familyName": "Fname",
"formatted": "formatted name"
}`

testJSONMarshal(t, u, want)
}

0 comments on commit d17bf21

Please sign in to comment.