Skip to content

Commit

Permalink
Add test case for JSON resource marshaling (#2528)
Browse files Browse the repository at this point in the history
  • Loading branch information
vaibhavgholap23 committed Oct 26, 2022
1 parent 2e86465 commit 9b60dfb
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions github/repos_merging_test.go
Expand Up @@ -126,3 +126,21 @@ func TestRepositoriesService_MergeUpstream(t *testing.T) {
return resp, err
})
}

func TestRepoMergeUpstreamResult_Marshal(t *testing.T) {
testJSONMarshal(t, &RepoMergeUpstreamResult{}, "{}")

u := &RepoMergeUpstreamResult{
Message: String("message"),
MergeType: String("merge_type"),
BaseBranch: String("base_branch"),
}

want := `{
"message": "message",
"merge_type": "merge_type",
"base_branch": "base_branch"
}`

testJSONMarshal(t, u, want)
}

0 comments on commit 9b60dfb

Please sign in to comment.