@@ -334,6 +334,32 @@ func TestActionService_ListRepositoryWorkflowRuns(t *testing.T) {
334
334
})
335
335
}
336
336
337
+ func TestActionService_DeleteWorkflowRun (t * testing.T ) {
338
+ client , mux , _ , teardown := setup ()
339
+ defer teardown ()
340
+
341
+ mux .HandleFunc ("/repos/o/r/actions/runs/399444496" , func (w http.ResponseWriter , r * http.Request ) {
342
+ testMethod (t , r , "DELETE" )
343
+
344
+ w .WriteHeader (http .StatusNoContent )
345
+ })
346
+
347
+ ctx := context .Background ()
348
+ if _ , err := client .Actions .DeleteWorkflowRun (ctx , "o" , "r" , 399444496 ); err != nil {
349
+ t .Errorf ("DeleteWorkflowRun returned error: %v" , err )
350
+ }
351
+
352
+ const methodName = "DeleteWorkflowRun"
353
+ testBadOptions (t , methodName , func () (err error ) {
354
+ _ , err = client .Actions .DeleteWorkflowRun (ctx , "\n " , "\n " , 399444496 )
355
+ return err
356
+ })
357
+
358
+ testNewRequestAndDoFailure (t , methodName , client , func () (* Response , error ) {
359
+ return client .Actions .DeleteWorkflowRun (ctx , "o" , "r" , 399444496 )
360
+ })
361
+ }
362
+
337
363
func TestActionService_DeleteWorkflowRunLogs (t * testing.T ) {
338
364
client , mux , _ , teardown := setup ()
339
365
defer teardown ()
0 commit comments