Skip to content

Commit

Permalink
Add test case for JSON resource marshaling (#2542)
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulkarmore committed Oct 28, 2022
1 parent 2ac6fb8 commit cb9253a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions github/teams_test.go
Expand Up @@ -2154,3 +2154,19 @@ func TestExternalGroupMember_Marshal(t *testing.T) {

testJSONMarshal(t, u, want)
}

func TestExternalGroupTeam_Marshal(t *testing.T) {
testJSONMarshal(t, &ExternalGroupTeam{}, "{}")

u := &ExternalGroupTeam{
TeamID: Int64(123),
TeamName: String("test"),
}

want := `{
"team_id": 123,
"team_name": "test"
}`

testJSONMarshal(t, u, want)
}

0 comments on commit cb9253a

Please sign in to comment.