diff options
| author | mo khan <mo@mokhan.ca> | 2021-07-10 21:06:41 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2021-07-10 21:06:41 -0600 |
| commit | 11696abe0e793752b258ad086cfd8fc35aab87f8 (patch) | |
| tree | 394c4f7ab99441a1db3dabaf7405a49b637b7981 /test/controllers | |
| parent | edd17c3764ff7607346dd2a4045e9ed59b15e028 (diff) | |
test: accept web hook for new installation
Diffstat (limited to 'test/controllers')
| -rw-r--r-- | test/controllers/githubs_controller_test.rb | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/test/controllers/githubs_controller_test.rb b/test/controllers/githubs_controller_test.rb new file mode 100644 index 0000000..716b0ea --- /dev/null +++ b/test/controllers/githubs_controller_test.rb @@ -0,0 +1,38 @@ +require "test_helper" + +class GithubsControllerTest < ActionDispatch::IntegrationTest + test "accepts a new app installation webhook" do + post '/github', params: { + "zen": "Design for failure.", + "hook_id": 306990071, + "hook": { + "type": "App", + "id": 306990071, + "name": "web", + "active": true, + "events": [ + "commit_comment", + "create", + "delete", + "meta", + "pull_request", + "pull_request_review", + "pull_request_review_comment", + "workflow_dispatch", + "workflow_run" + ], + "config": { + "content_type": "json", + "insecure_ssl": "0", + "url": "https://f92dbf01bd27.ngrok.io/gh/hook/" + }, + "updated_at": "2021-07-11T02:15:28Z", + "created_at": "2021-07-11T02:15:28Z", + "app_id": 125988, + "deliveries_url": "https://api.github.com/app/hook/deliveries" + } + } + + assert_response :no_content + end +end |
