Skip to content

Commit a1c1958

Browse files
committed
added JSON marshalling test for ReviewersRequest - helps #55
1 parent 138be44 commit a1c1958

1 file changed

Lines changed: 23 additions & 1 deletion

File tree

‎github/pulls_reviewers_test.go‎

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,29 @@ import (
1313
"testing"
1414
)
1515

16-
func TestReviewers_marshall(t *testing.T) {
16+
func TestReviewersRequest_marshal(t *testing.T) {
17+
testJSONMarshal(t, &ReviewersRequest{}, "{}")
18+
19+
u := &ReviewersRequest{
20+
NodeID: String("n"),
21+
Reviewers: []string{"r"},
22+
TeamReviewers: []string{"t"},
23+
}
24+
25+
want := `{
26+
"node_id": "n",
27+
"reviewers": [
28+
"r"
29+
],
30+
"team_reviewers" : [
31+
"t"
32+
]
33+
}`
34+
35+
testJSONMarshal(t, u, want)
36+
}
37+
38+
func TestReviewers_marshal(t *testing.T) {
1739
testJSONMarshal(t, &Reviewers{}, "{}")
1840

1941
u := &Reviewers{

0 commit comments

Comments
 (0)