@@ -930,7 +930,7 @@ func TestRepositoriesService_GetBranch(t *testing.T) {
930930 for _ , test := range tests {
931931 mux .HandleFunc (test .urlPath , func (w http.ResponseWriter , r * http.Request ) {
932932 testMethod (t , r , "GET" )
933- fmt .Fprint (w , `{"name":"n", "commit":{"sha":"s","commit":{"message":"m"}}, "protected":true}` )
933+ fmt .Fprint (w , `{"name":"n", "commit":{"sha":"s","commit":{"message":"m"}}, "protected":true, "protection":{"required_status_checks":{"contexts":["c"]}} }` )
934934 })
935935
936936 ctx := context .Background ()
@@ -948,6 +948,11 @@ func TestRepositoriesService_GetBranch(t *testing.T) {
948948 },
949949 },
950950 Protected : Bool (true ),
951+ Protection : & Protection {
952+ RequiredStatusChecks : & RequiredStatusChecks {
953+ Contexts : & []string {"c" },
954+ },
955+ },
951956 }
952957
953958 if ! cmp .Equal (branch , want ) {
@@ -1000,7 +1005,7 @@ func TestRepositoriesService_GetBranch_StatusMovedPermanently_followRedirects(t
10001005 })
10011006 mux .HandleFunc ("/repos/o/r/branches/br" , func (w http.ResponseWriter , r * http.Request ) {
10021007 testMethod (t , r , "GET" )
1003- fmt .Fprint (w , `{"name":"n", "commit":{"sha":"s","commit":{"message":"m"}}, "protected":true}` )
1008+ fmt .Fprint (w , `{"name":"n", "commit":{"sha":"s","commit":{"message":"m"}}, "protected":true, "protection":{"required_status_checks":{"contexts":["c"]}} }` )
10041009 })
10051010 ctx := context .Background ()
10061011 branch , resp , err := client .Repositories .GetBranch (ctx , "o" , "r" , "b" , 1 )
@@ -1020,6 +1025,11 @@ func TestRepositoriesService_GetBranch_StatusMovedPermanently_followRedirects(t
10201025 },
10211026 },
10221027 Protected : Bool (true ),
1028+ Protection : & Protection {
1029+ RequiredStatusChecks : & RequiredStatusChecks {
1030+ Contexts : & []string {"c" },
1031+ },
1032+ },
10231033 }
10241034 if ! cmp .Equal (branch , want ) {
10251035 t .Errorf ("Repositories.GetBranch returned %+v, want %+v" , branch , want )
0 commit comments