summaryrefslogtreecommitdiffstats
path: root/integrations/api_team_test.go
diff options
context:
space:
mode:
authorEthan Koenig <etk39@cornell.edu>2017-06-18 05:06:17 -0400
committerLunny Xiao <xiaolunwen@gmail.com>2017-06-18 17:06:17 +0800
commit255adc40ae1e0a03547326f143f685be41fa591f (patch)
tree01959c4c9b8cc62c906205aced21954d0ae90573 /integrations/api_team_test.go
parent4df1a240965f6d3f4e3eed2bd4bddceeb9182614 (diff)
downloadgitea-255adc40ae1e0a03547326f143f685be41fa591f.tar.gz
gitea-255adc40ae1e0a03547326f143f685be41fa591f.zip
Don't show non-comments in comments API (#2001)
Diffstat (limited to 'integrations/api_team_test.go')
-rw-r--r--integrations/api_team_test.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/integrations/api_team_test.go b/integrations/api_team_test.go
index 9103042042..4b2a79a8cc 100644
--- a/integrations/api_team_test.go
+++ b/integrations/api_team_test.go
@@ -5,8 +5,6 @@
package integrations
import (
- "bytes"
- "encoding/json"
"fmt"
"net/http"
"testing"
@@ -30,8 +28,7 @@ func TestAPITeam(t *testing.T) {
assert.EqualValues(t, http.StatusOK, resp.HeaderCode)
var apiTeam api.Team
- decoder := json.NewDecoder(bytes.NewBuffer(resp.Body))
- assert.NoError(t, decoder.Decode(&apiTeam))
+ DecodeJSON(t, resp, &apiTeam)
assert.EqualValues(t, team.ID, apiTeam.ID)
assert.Equal(t, team.Name, apiTeam.Name)
}