aboutsummaryrefslogtreecommitdiffstats
path: root/integrations/integration_test.go
diff options
context:
space:
mode:
authortechknowlogick <techknowlogick@users.noreply.github.com>2018-07-06 21:54:30 -0400
committerGitHub <noreply@github.com>2018-07-06 21:54:30 -0400
commitab55ca7ebd7d30dad894c35e6facd0b1822fb899 (patch)
tree979f05088d7d0362cb7c95f097ff3931b3dc2e91 /integrations/integration_test.go
parent1675fc4301d4bff339a0831348fca76a9e394999 (diff)
downloadgitea-ab55ca7ebd7d30dad894c35e6facd0b1822fb899.tar.gz
gitea-ab55ca7ebd7d30dad894c35e6facd0b1822fb899.zip
Add ability to delete a token (#4235)
Fix #4234
Diffstat (limited to 'integrations/integration_test.go')
-rw-r--r--integrations/integration_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/integrations/integration_test.go b/integrations/integration_test.go
index 664290cc9d..a1e66ffdfd 100644
--- a/integrations/integration_test.go
+++ b/integrations/integration_test.go
@@ -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 {