Skip to content

Commit

Permalink
Add test case for JSON resource marshaling (google#2526)
Browse files Browse the repository at this point in the history
  • Loading branch information
vaibhavgholap23 authored and Harikesh00 committed Oct 25, 2022
1 parent 3c66d7d commit 922385f
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 922385f

Please sign in to comment.