2017-04-28 22:33:25 -06: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 03:34:30 -06:00
|
|
|
prepareTestEnv(t)
|
2017-04-28 22:33:25 -06:00
|
|
|
|
2017-06-09 18:41:36 -06:00
|
|
|
req := NewRequest(t, "GET", "/api/v1/users/user2/repos")
|
2017-07-07 13:36:47 -06:00
|
|
|
MakeRequest(t, req, http.StatusOK)
|
2017-04-28 22:33:25 -06:00
|
|
|
}
|
2017-04-29 23:08:09 -06:00
|
|
|
|
|
|
|
func TestAPISearchRepoNotLogin(t *testing.T) {
|
2017-06-25 03:34:30 -06:00
|
|
|
prepareTestEnv(t)
|
2017-04-29 23:08:09 -06:00
|
|
|
|
2017-06-09 18:41:36 -06:00
|
|
|
req := NewRequest(t, "GET", "/api/v1/repos/search?q=Test")
|
2017-07-07 13:36:47 -06:00
|
|
|
MakeRequest(t, req, http.StatusOK)
|
2017-04-29 23:08:09 -06:00
|
|
|
}
|