@@ -434,7 +434,7 @@ func TestRepositoriesService_ListBranches(t *testing.T) {
434
434
t .Errorf ("Repositories.ListBranches returned error: %v" , err )
435
435
}
436
436
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" )}}}
438
438
if ! reflect .DeepEqual (branches , want ) {
439
439
t .Errorf ("Repositories.ListBranches returned %+v, want %+v" , branches , want )
440
440
}
@@ -447,7 +447,7 @@ func TestRepositoriesService_GetBranch(t *testing.T) {
447
447
mux .HandleFunc ("/repos/o/r/branches/b" , func (w http.ResponseWriter , r * http.Request ) {
448
448
testMethod (t , r , "GET" )
449
449
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}` )
451
451
})
452
452
453
453
branch , _ , err := client .Repositories .GetBranch ("o" , "r" , "b" )
@@ -456,8 +456,13 @@ func TestRepositoriesService_GetBranch(t *testing.T) {
456
456
}
457
457
458
458
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
+ },
461
466
Protected : Bool (true ),
462
467
}
463
468
0 commit comments