mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 05:52:43 +00:00
Merge pull request 'Data size unit localization' (#2528) from 0ko/forgejo:sizelocalize into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2528 Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org> Reviewed-by: Gusted <gusted@noreply.codeberg.org>
This commit is contained in:
commit
385bcca788
25 changed files with 237 additions and 32 deletions
|
@ -218,6 +218,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