Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Resource Tested for JSON marshalling : ActionsEnabledOnOrgRepos
  • Loading branch information
sagar23sj committed Jun 22, 2021
commit 2a1c2ae964ad5009c435474c32b9300753c7da05
28 changes: 28 additions & 0 deletions github/actions_runners_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -524,3 +524,31 @@ func TestRunnerApplicationDownload_Marshal(t *testing.T) {

testJSONMarshal(t, u, want)
}

func TestActionsEnabledOnOrgRepos_Marshal(t *testing.T) {
testJSONMarshal(t, &ActionsEnabledOnOrgRepos{}, "{}")

u := &ActionsEnabledOnOrgRepos{
TotalCount: 1,
Repositories: []*Repository{
{
ID: Int64(1),
URL: String("u"),
Name: String("n"),
},
},
}

want := `{
"total_count": 1,
"repositories": [
{
"id": 1,
"url": "u",
"name": "n"
}
]
}`

testJSONMarshal(t, u, want)
}