@@ -59,6 +59,7 @@ func TestMain(m *testing.M) {
5959		OrganizationEvent ,
6060		OrgBlockEvent ,
6161		PageBuildEvent ,
62+ 		PingEvent ,
6263		ProjectCardEvent ,
6364		ProjectColumnEvent ,
6465		ProjectEvent ,
@@ -2742,6 +2743,48 @@ func TestPageBuildEvent(t *testing.T) {
27422743	Equal (t , resp .StatusCode , http .StatusOK )
27432744}
27442745
2746+ func  TestPingEvent (t  * testing.T ) {
2747+ 
2748+ 	payload  :=  `{ 
2749+     "zen": "Keep it logically awesome.", 
2750+     "hook_id": 20081052, 
2751+     "hook": { 
2752+         "type": "App", 
2753+         "id": 20081052, 
2754+         "name": "web", 
2755+         "active": true, 
2756+         "events": [ 
2757+             "pull_request" 
2758+         ], 
2759+         "config": { 
2760+             "content_type": "json", 
2761+             "insecure_ssl": "0", 
2762+             "secret": "********", 
2763+             "url": "https://ngrok.io/webhook" 
2764+         }, 
2765+         "updated_at": "2018-01-15T10:48:54Z", 
2766+         "created_at": "2018-01-15T10:48:54Z", 
2767+         "app_id": 8157 
2768+     } 
2769+ } 
2770+ ` 
2771+ 
2772+ 	req , err  :=  http .NewRequest ("POST" , "http://127.0.0.1:3010/webhooks" , bytes .NewBuffer ([]byte (payload )))
2773+ 	req .Header .Set ("Content-Type" , "application/json" )
2774+ 	req .Header .Set ("X-Github-Event" , "ping" )
2775+ 	req .Header .Set ("X-Hub-Signature" , "sha1=f82267eb5c6408d5986209da906747f57c11b33b" )
2776+ 
2777+ 	Equal (t , err , nil )
2778+ 
2779+ 	client  :=  & http.Client {}
2780+ 	resp , err  :=  client .Do (req )
2781+ 	Equal (t , err , nil )
2782+ 
2783+ 	defer  resp .Body .Close ()
2784+ 
2785+ 	Equal (t , resp .StatusCode , http .StatusOK )
2786+ }
2787+ 
27452788func  TestProjectCardEvent (t  * testing.T ) {
27462789
27472790	payload  :=  `{ 
0 commit comments