forked from forgejo/forgejo
Add integration test for TrSize
This commit is contained in:
parent
075e0de142
commit
bba1884582
2 changed files with 124 additions and 0 deletions
|
@ -180,6 +180,16 @@ func (s *TestSession) GetCookie(name string) *http.Cookie {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (s *TestSession) SetCookie(cookie *http.Cookie) *http.Cookie {
|
||||
baseURL, err := url.Parse(setting.AppURL)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
s.jar.SetCookies(baseURL, []*http.Cookie{cookie})
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *TestSession) MakeRequest(t testing.TB, rw *RequestWrapper, expectedStatus int) *httptest.ResponseRecorder {
|
||||
t.Helper()
|
||||
req := rw.Request
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue