Skip to content

Commit aad0285

Browse files
authored
Add test cases for JSON resource marshaling (#1990)
1 parent e325ce3 commit aad0285

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

github/orgs_actions_allowed_test.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,21 @@ func TestActionsAllowed_Marshal(t *testing.T) {
103103

104104
testJSONMarshal(t, u, want)
105105
}
106+
107+
func TestActionsPermissions_Marshal(t *testing.T) {
108+
testJSONMarshal(t, &ActionsPermissions{}, "{}")
109+
110+
u := &ActionsPermissions{
111+
EnabledRepositories: String("e"),
112+
AllowedActions: String("a"),
113+
SelectedActionsURL: String("sau"),
114+
}
115+
116+
want := `{
117+
"enabled_repositories": "e",
118+
"allowed_actions": "a",
119+
"selected_actions_url": "sau"
120+
}`
121+
122+
testJSONMarshal(t, u, want)
123+
}

0 commit comments

Comments
 (0)