Skip to content

Commit

Permalink
Merge branch 'master' into Team_Test_ExternalGroupMember
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulkarmore committed Oct 28, 2022
2 parents 9cb3a4e + 2ac6fb8 commit 92a2236
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions github/repos_environments_test.go
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)
}

0 comments on commit 92a2236

Please sign in to comment.