@@ -73,11 +73,11 @@ func TestRepositoriesService_CreateFork(t *testing.T) {
73
73
74
74
mux .HandleFunc ("/repos/o/r/forks" , func (w http.ResponseWriter , r * http.Request ) {
75
75
testMethod (t , r , "POST" )
76
- testFormValues (t , r , values {"organization" : "o" })
76
+ testFormValues (t , r , values {"organization" : "o" , "name" : "n" , "default_branch_only" : "true" })
77
77
fmt .Fprint (w , `{"id":1}` )
78
78
})
79
79
80
- opt := & RepositoryCreateForkOptions {Organization : "o" }
80
+ opt := & RepositoryCreateForkOptions {Organization : "o" , Name : "n" , DefaultBranchOnly : true }
81
81
ctx := context .Background ()
82
82
repo , _ , err := client .Repositories .CreateFork (ctx , "o" , "r" , opt )
83
83
if err != nil {
@@ -110,13 +110,13 @@ func TestRepositoriesService_CreateFork_deferred(t *testing.T) {
110
110
111
111
mux .HandleFunc ("/repos/o/r/forks" , func (w http.ResponseWriter , r * http.Request ) {
112
112
testMethod (t , r , "POST" )
113
- testFormValues (t , r , values {"organization" : "o" })
113
+ testFormValues (t , r , values {"organization" : "o" , "name" : "n" , "default_branch_only" : "true" })
114
114
// This response indicates the fork will happen asynchronously.
115
115
w .WriteHeader (http .StatusAccepted )
116
116
fmt .Fprint (w , `{"id":1}` )
117
117
})
118
118
119
- opt := & RepositoryCreateForkOptions {Organization : "o" }
119
+ opt := & RepositoryCreateForkOptions {Organization : "o" , Name : "n" , DefaultBranchOnly : true }
120
120
ctx := context .Background ()
121
121
repo , _ , err := client .Repositories .CreateFork (ctx , "o" , "r" , opt )
122
122
if _ , ok := err .(* AcceptedError ); ! ok {
0 commit comments