mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-01 17:38:33 +00:00
Don't show non-comments in comments API (#2001)
This commit is contained in:
parent
4df1a24096
commit
255adc40ae
5 changed files with 49 additions and 10 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue