Skip to content

Commit

Permalink
Add test case for JSON resource marshaling (#2548)
Browse files Browse the repository at this point in the history
  • Loading branch information
vaibhavgholap23 committed Oct 31, 2022
1 parent 282a391 commit 5d388bd
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions github/users_test.go
Expand Up @@ -510,3 +510,19 @@ func TestUserListOptions_Marshal(t *testing.T) {

testJSONMarshal(t, u, want)
}

func TestHovercardOptions_Marshal(t *testing.T) {
testJSONMarshal(t, &HovercardOptions{}, "{}")

u := &HovercardOptions{
SubjectType: "subjectType",
SubjectID: "subjectID",
}

want := `{
"SubjectType" : "subjectType",
"SubjectID" : "subjectID"
}`

testJSONMarshal(t, u, want)
}

0 comments on commit 5d388bd

Please sign in to comment.