Skip to content

Commit 5d388bd

Browse files
Add test case for JSON resource marshaling (#2548)
1 parent 282a391 commit 5d388bd

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

github/users_test.go

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

511511
testJSONMarshal(t, u, want)
512512
}
513+
514+
func TestHovercardOptions_Marshal(t *testing.T) {
515+
testJSONMarshal(t, &HovercardOptions{}, "{}")
516+
517+
u := &HovercardOptions{
518+
SubjectType: "subjectType",
519+
SubjectID: "subjectID",
520+
}
521+
522+
want := `{
523+
"SubjectType" : "subjectType",
524+
"SubjectID" : "subjectID"
525+
}`
526+
527+
testJSONMarshal(t, u, want)
528+
}

0 commit comments

Comments
 (0)