Skip to content

Commit a42360c

Browse files
committed
added json rresource marshaling - TagProtection
1 parent 282a391 commit a42360c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

github/repos_tags_test.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,19 @@ func TestRepositoriesService_DeleteTagProtection(t *testing.T) {
130130
return client.Repositories.DeleteTagProtection(ctx, "o", "r", 1)
131131
})
132132
}
133+
134+
func TestTagProtection_Marshal(t *testing.T) {
135+
testJSONMarshal(t, &TagProtection{}, "{}")
136+
137+
u := &TagProtection{
138+
ID: Int64(1),
139+
Pattern: String("pattern"),
140+
}
141+
142+
want := `{
143+
"id": 1,
144+
"pattern": "pattern"
145+
}`
146+
147+
testJSONMarshal(t, u, want)
148+
}

0 commit comments

Comments
 (0)