mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-26 06:16:56 +09:00
Fix bug in issue labels API (#2048)
This commit is contained in:
1 parent
bf187304dc
commit
3ffedeab03
3 files changed
+69
-3
No files matched your search
@@ -229,7 +229,9 @@ func NewRequestWithValues(t testing.TB, method, urlStr string, values map[string
|
||||
func NewRequestWithJSON(t testing.TB, method, urlStr string, v interface{}) *http.Request {
|
||||
jsonBytes, err := json.Marshal(v)
|
||||
assert.NoError(t, err)
|
||||
return NewRequestWithBody(t, method, urlStr, bytes.NewBuffer(jsonBytes))
|
||||
req := NewRequestWithBody(t, method, urlStr, bytes.NewBuffer(jsonBytes))
|
||||
req.Header.Add("Content-Type", "application/json")
|
||||
return req
|
||||
}
|
||||
|
||||
func NewRequestWithBody(t testing.TB, method, urlStr string, body io.Reader) *http.Request {
|
||||
|
||||
Reference in new issue
Block a user