Skip to content

Commit cb9253a

Browse files
authored
Add test case for JSON resource marshaling (#2542)
1 parent 2ac6fb8 commit cb9253a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

github/teams_test.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2154,3 +2154,19 @@ func TestExternalGroupMember_Marshal(t *testing.T) {
21542154

21552155
testJSONMarshal(t, u, want)
21562156
}
2157+
2158+
func TestExternalGroupTeam_Marshal(t *testing.T) {
2159+
testJSONMarshal(t, &ExternalGroupTeam{}, "{}")
2160+
2161+
u := &ExternalGroupTeam{
2162+
TeamID: Int64(123),
2163+
TeamName: String("test"),
2164+
}
2165+
2166+
want := `{
2167+
"team_id": 123,
2168+
"team_name": "test"
2169+
}`
2170+
2171+
testJSONMarshal(t, u, want)
2172+
}

0 commit comments

Comments
 (0)