1
0
Fork 0
forked from forgejo/forgejo

fix #1643 and improve integration test (#1645)

This commit is contained in:
Lunny Xiao 2017-04-30 13:08:09 +08:00 committed by Bo-Yi Wu
parent 00324cea10
commit 0308d44a16
4 changed files with 36 additions and 10 deletions

View file

@ -21,3 +21,12 @@ func TestAPIUserReposNotLogin(t *testing.T) {
resp := MakeRequest(req)
assert.EqualValues(t, http.StatusOK, resp.HeaderCode)
}
func TestAPISearchRepoNotLogin(t *testing.T) {
assert.NoError(t, models.LoadFixtures())
req, err := http.NewRequest("GET", "/api/v1/repos/search?q=Test", nil)
assert.NoError(t, err)
resp := MakeRequest(req)
assert.EqualValues(t, http.StatusOK, resp.HeaderCode)
}