2017-04-29 04:33:25 +00:00
|
|
|
// Copyright 2017 The Gitea Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a MIT-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
package integrations
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestAPIUserReposNotLogin(t *testing.T) {
|
2017-06-25 09:34:30 +00:00
|
|
|
prepareTestEnv(t)
|
2017-04-29 04:33:25 +00:00
|
|
|
|
2017-06-10 00:41:36 +00:00
|
|
|
req := NewRequest(t, "GET", "/api/v1/users/user2/repos")
|
2017-07-07 19:36:47 +00:00
|
|
|
MakeRequest(t, req, http.StatusOK)
|
2017-04-29 04:33:25 +00:00
|
|
|
}
|
2017-04-30 05:08:09 +00:00
|
|
|
|
|
|
|
func TestAPISearchRepoNotLogin(t *testing.T) {
|
2017-06-25 09:34:30 +00:00
|
|
|
prepareTestEnv(t)
|
2017-04-30 05:08:09 +00:00
|
|
|
|
2017-06-10 00:41:36 +00:00
|
|
|
req := NewRequest(t, "GET", "/api/v1/repos/search?q=Test")
|
2017-07-07 19:36:47 +00:00
|
|
|
MakeRequest(t, req, http.StatusOK)
|
2017-04-30 05:08:09 +00:00
|
|
|
}
|