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