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