failIfNotStatusCode invokes t.Fatal() if the response's status code doesn't match the expected code.
(t *testing.T, resp *github.Response, expectedCode int)
| 111 | |
| 112 | // failIfNotStatusCode invokes t.Fatal() if the response's status code doesn't match the expected code. |
| 113 | func failIfNotStatusCode(t *testing.T, resp *github.Response, expectedCode int) { |
| 114 | if resp.StatusCode != expectedCode { |
| 115 | t.Fatalf("Expected HTTP status code [%v] but received [%v]", expectedCode, resp.StatusCode) |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | // getOAuthAppClient returns a GitHub client for authorization testing. The client |
| 120 | // uses BasicAuth, but instead of username and password, it uses the client id |
no outgoing calls
no test coverage detected
searching dependent graphs…