fix #1643 and improve integration test (#1645)

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

No files matched your search

+9
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)
}