code_corps v0.0.1 CodeCorps.GitHub.FailureAPI View Source

A basic GitHub API mock which returns a 401 forbidden for all requests.

Should be good enough for any tests that simply assert a piece of code is able to recover from a generic request error.

For any tests that cover handling of specific errors, a non-default API should be defined inline.

Since our GitHub requests are often forced to start with an installation access token request, that one is set to succeed here as well.

Link to this section Summary

Link to this section Functions

Link to this function request(method, url, body, headers, options) View Source