Add ability to delete a token (#4235)

Fix #4234
This commit is contained in:
techknowlogick 2018-07-06 21:54:30 -04:00 committed by GitHub
parent 1675fc4301
commit ab55ca7ebd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 138 additions and 1 deletions

View file

@ -256,6 +256,11 @@ func NewRequestWithBody(t testing.TB, method, urlStr string, body io.Reader) *ht
return request
}
func AddBasicAuthHeader(request *http.Request, username string) *http.Request {
request.SetBasicAuth(username, userPassword)
return request
}
const NoExpectedStatus = -1
func MakeRequest(t testing.TB, req *http.Request, expectedStatus int) *httptest.ResponseRecorder {