@@ -73,11 +73,11 @@ func TestRepositoriesService_CreateFork(t *testing.T) {
7373
7474 mux .HandleFunc ("/repos/o/r/forks" , func (w http.ResponseWriter , r * http.Request ) {
7575 testMethod (t , r , "POST" )
76- testFormValues (t , r , values {"organization" : "o" })
76+ testFormValues (t , r , values {"organization" : "o" , "name" : "n" , "default_branch_only" : "true" })
7777 fmt .Fprint (w , `{"id":1}` )
7878 })
7979
80- opt := & RepositoryCreateForkOptions {Organization : "o" }
80+ opt := & RepositoryCreateForkOptions {Organization : "o" , Name : "n" , DefaultBranchOnly : true }
8181 ctx := context .Background ()
8282 repo , _ , err := client .Repositories .CreateFork (ctx , "o" , "r" , opt )
8383 if err != nil {
@@ -110,13 +110,13 @@ func TestRepositoriesService_CreateFork_deferred(t *testing.T) {
110110
111111 mux .HandleFunc ("/repos/o/r/forks" , func (w http.ResponseWriter , r * http.Request ) {
112112 testMethod (t , r , "POST" )
113- testFormValues (t , r , values {"organization" : "o" })
113+ testFormValues (t , r , values {"organization" : "o" , "name" : "n" , "default_branch_only" : "true" })
114114 // This response indicates the fork will happen asynchronously.
115115 w .WriteHeader (http .StatusAccepted )
116116 fmt .Fprint (w , `{"id":1}` )
117117 })
118118
119- opt := & RepositoryCreateForkOptions {Organization : "o" }
119+ opt := & RepositoryCreateForkOptions {Organization : "o" , Name : "n" , DefaultBranchOnly : true }
120120 ctx := context .Background ()
121121 repo , _ , err := client .Repositories .CreateFork (ctx , "o" , "r" , opt )
122122 if _ , ok := err .(* AcceptedError ); ! ok {
0 commit comments