summaryrefslogtreecommitdiffstats
path: root/integrations/integration_test.go
diff options
context:
space:
mode:
authorEthan Koenig <etk39@cornell.edu>2017-06-24 19:52:51 -0400
committerLunny Xiao <xiaolunwen@gmail.com>2017-06-25 07:52:51 +0800
commit3ffedeab03a80e7345823d118042d17a3e3d9b52 (patch)
tree574d09deca0290312e506298f720880170b080e2 /integrations/integration_test.go
parentbf187304dc1c03e003dc972e36d9e087c78df57a (diff)
downloadgitea-3ffedeab03a80e7345823d118042d17a3e3d9b52.tar.gz
gitea-3ffedeab03a80e7345823d118042d17a3e3d9b52.zip
Fix bug in issue labels API (#2048)
Diffstat (limited to 'integrations/integration_test.go')
-rw-r--r--integrations/integration_test.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/integrations/integration_test.go b/integrations/integration_test.go
index e935d36f19..84b05cb644 100644
--- a/integrations/integration_test.go
+++ b/integrations/integration_test.go
@@ -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 {