@@ -434,7 +434,7 @@ func TestRepositoriesService_ListBranches(t *testing.T) {
434434 t .Errorf ("Repositories.ListBranches returned error: %v" , err )
435435 }
436436
437- want := []* Branch {{Name : String ("master" ), Commit : & Commit {SHA : String ("a57781" ), URL : String ("https://api.github.com/repos/o/r/commits/a57781" )}}}
437+ want := []* Branch {{Name : String ("master" ), Commit : & RepositoryCommit {SHA : String ("a57781" ), URL : String ("https://api.github.com/repos/o/r/commits/a57781" )}}}
438438 if ! reflect .DeepEqual (branches , want ) {
439439 t .Errorf ("Repositories.ListBranches returned %+v, want %+v" , branches , want )
440440 }
@@ -447,7 +447,7 @@ func TestRepositoriesService_GetBranch(t *testing.T) {
447447 mux .HandleFunc ("/repos/o/r/branches/b" , func (w http.ResponseWriter , r * http.Request ) {
448448 testMethod (t , r , "GET" )
449449 testHeader (t , r , "Accept" , mediaTypeProtectedBranchesPreview )
450- fmt .Fprint (w , `{"name":"n", "commit":{"sha":"s"}, "protected":true}` )
450+ fmt .Fprint (w , `{"name":"n", "commit":{"sha":"s","commit":{"message":"m"} }, "protected":true}` )
451451 })
452452
453453 branch , _ , err := client .Repositories .GetBranch ("o" , "r" , "b" )
@@ -456,8 +456,13 @@ func TestRepositoriesService_GetBranch(t *testing.T) {
456456 }
457457
458458 want := & Branch {
459- Name : String ("n" ),
460- Commit : & Commit {SHA : String ("s" )},
459+ Name : String ("n" ),
460+ Commit : & RepositoryCommit {
461+ SHA : String ("s" ),
462+ Commit : & Commit {
463+ Message : String ("m" ),
464+ },
465+ },
461466 Protected : Bool (true ),
462467 }
463468
0 commit comments