Skip to content

Commit 8ad980b

Browse files
authored
Add test cases for JSON resource marshaling (#2187)
1 parent aaf262f commit 8ad980b

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

github/teams_test.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1727,3 +1727,21 @@ func TestInvitation_Marshal(t *testing.T) {
17271727

17281728
testJSONMarshal(t, u, want)
17291729
}
1730+
1731+
func TestIDPGroup_Marshal(t *testing.T) {
1732+
testJSONMarshal(t, &IDPGroup{}, "{}")
1733+
1734+
u := &IDPGroup{
1735+
GroupID: String("abc1"),
1736+
GroupName: String("test group"),
1737+
GroupDescription: String("test group descripation"),
1738+
}
1739+
1740+
want := `{
1741+
"group_id": "abc1",
1742+
"group_name": "test group",
1743+
"group_description":"test group descripation"
1744+
}`
1745+
1746+
testJSONMarshal(t, u, want)
1747+
}

0 commit comments

Comments
 (0)