Fork to maintain patches against the official gitea for https://code.ceondo.com https://github.com/go-gitea/gitea

api_repo_test.go 548B

12345678910111213141516171819202122232425
  1. // Copyright 2017 The Gitea Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package integrations
  5. import (
  6. "net/http"
  7. "testing"
  8. )
  9. func TestAPIUserReposNotLogin(t *testing.T) {
  10. prepareTestEnv(t)
  11. req := NewRequest(t, "GET", "/api/v1/users/user2/repos")
  12. MakeRequest(t, req, http.StatusOK)
  13. }
  14. func TestAPISearchRepoNotLogin(t *testing.T) {
  15. prepareTestEnv(t)
  16. req := NewRequest(t, "GET", "/api/v1/repos/search?q=Test")
  17. MakeRequest(t, req, http.StatusOK)
  18. }