Skip to content

Commit 9b60dfb

Browse files
Add test case for JSON resource marshaling (#2528)
1 parent 2e86465 commit 9b60dfb

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

github/repos_merging_test.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,3 +126,21 @@ func TestRepositoriesService_MergeUpstream(t *testing.T) {
126126
return resp, err
127127
})
128128
}
129+
130+
func TestRepoMergeUpstreamResult_Marshal(t *testing.T) {
131+
testJSONMarshal(t, &RepoMergeUpstreamResult{}, "{}")
132+
133+
u := &RepoMergeUpstreamResult{
134+
Message: String("message"),
135+
MergeType: String("merge_type"),
136+
BaseBranch: String("base_branch"),
137+
}
138+
139+
want := `{
140+
"message": "message",
141+
"merge_type": "merge_type",
142+
"base_branch": "base_branch"
143+
}`
144+
145+
testJSONMarshal(t, u, want)
146+
}

0 commit comments

Comments
 (0)