diff options
| author | mo khan <mo@mokhan.ca> | 2021-07-10 21:11:22 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2021-07-10 21:11:22 -0600 |
| commit | df77c3bc0870a8c88ec3475c7c17d79744e565b5 (patch) | |
| tree | 591099ed512d5b3a3fc20c52bf52115390e8e42f /test/controllers | |
| parent | 11696abe0e793752b258ad086cfd8fc35aab87f8 (diff) | |
test: extract payload into fixture file
Diffstat (limited to 'test/controllers')
| -rw-r--r-- | test/controllers/githubs_controller_test.rb | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/test/controllers/githubs_controller_test.rb b/test/controllers/githubs_controller_test.rb index 716b0ea..4e367ba 100644 --- a/test/controllers/githubs_controller_test.rb +++ b/test/controllers/githubs_controller_test.rb @@ -2,36 +2,7 @@ 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" - } - } + post '/github', params: JSON.parse(file_fixture("webhooks/app.json").read) assert_response :no_content end |
