summaryrefslogtreecommitdiffstats
path: root/integrations/api_repo_test.go
blob: 180105d4c0d21c6730a65fa04cfa5f60d04c0bf0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// 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) {
	prepareTestEnv(t)

	req := NewRequest(t, "GET", "/api/v1/users/user2/repos")
	MakeRequest(t, req, http.StatusOK)
}

func TestAPISearchRepoNotLogin(t *testing.T) {
	prepareTestEnv(t)

	req := NewRequest(t, "GET", "/api/v1/repos/search?q=Test")
	MakeRequest(t, req, http.StatusOK)
}