Skip to content

Commit

Permalink
Add test case for JSON resource marshaling (#2537)
Browse files Browse the repository at this point in the history
  • Loading branch information
akshaypatil3096 committed Oct 27, 2022
1 parent cb4df26 commit f550bc8
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions github/teams_test.go
Expand Up @@ -2134,3 +2134,23 @@ func TestIDPGroupList_Marshal(t *testing.T) {

testJSONMarshal(t, u, want)
}

func TestExternalGroupMember_Marshal(t *testing.T) {
testJSONMarshal(t, &ExternalGroupMember{}, "{}")

u := &ExternalGroupMember{
MemberID: Int64(1),
MemberLogin: String("test member"),
MemberName: String("test member name"),
MemberEmail: String("test member email"),
}

want := `{
"member_id": 1,
"member_login": "test member",
"member_name":"test member name",
"member_email":"test member email"
}`

testJSONMarshal(t, u, want)
}

0 comments on commit f550bc8

Please sign in to comment.