Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/rahulkarmore/go-github in…
Browse files Browse the repository at this point in the history
…to Team_Test_ExternalGroupMember
  • Loading branch information
rahulkarmore committed Oct 28, 2022
2 parents 9cb3a4e + cb9253a commit f05ba3d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
16 changes: 16 additions & 0 deletions github/repos_environments_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,3 +426,19 @@ func TestEnvironment_Marshal(t *testing.T) {

testJSONMarshal(t, repoEnv, want)
}

func TestBranchPolicy_Marshal(t *testing.T) {
testJSONMarshal(t, &BranchPolicy{}, "{}")

bp := &BranchPolicy{
ProtectedBranches: Bool(false),
CustomBranchPolicies: Bool(false),
}

want := `{
"protected_branches": false,
"custom_branch_policies": false
}`

testJSONMarshal(t, bp, want)
}
16 changes: 16 additions & 0 deletions github/teams_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2208,3 +2208,19 @@ func TestExternalGroup_Marshal(t *testing.T) {

testJSONMarshal(t, u, want)
}

func TestExternalGroupTeam_Marshal(t *testing.T) {
testJSONMarshal(t, &ExternalGroupTeam{}, "{}")

u := &ExternalGroupTeam{
TeamID: Int64(123),
TeamName: String("test"),
}

want := `{
"team_id": 123,
"team_name": "test"
}`

testJSONMarshal(t, u, want)
}

0 comments on commit f05ba3d

Please sign in to comment.