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"
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
|
@ -22,11 +20,9 @@ func TestVersion(t *testing.T) {
|
|||
setting.AppVer = "1.1.0+dev"
|
||||
req := NewRequest(t, "GET", "/api/v1/version")
|
||||
resp := MakeRequest(req)
|
||||
assert.EqualValues(t, http.StatusOK, resp.HeaderCode)
|
||||
|
||||
var version gitea.ServerVersion
|
||||
decoder := json.NewDecoder(bytes.NewBuffer(resp.Body))
|
||||
assert.NoError(t, decoder.Decode(&version))
|
||||
|
||||
assert.EqualValues(t, http.StatusOK, resp.HeaderCode)
|
||||
DecodeJSON(t, resp, &version)
|
||||
assert.Equal(t, setting.AppVer, string(version.Version))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue