mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Support org/user level projects (#22235)
Fix #13405 <img width="1151" alt="image" src="https://user-images.githubusercontent.com/81045/209442911-7baa3924-c389-47b6-b63b-a740803e640e.png"> Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
@@ -22,7 +22,7 @@ func TestIsProjectTypeValid(t *testing.T) {
|
||||
}{
|
||||
{TypeIndividual, false},
|
||||
{TypeRepository, true},
|
||||
{TypeOrganization, false},
|
||||
{TypeOrganization, true},
|
||||
{UnknownType, false},
|
||||
}
|
||||
|
||||
@@ -34,13 +34,13 @@ func TestIsProjectTypeValid(t *testing.T) {
|
||||
func TestGetProjects(t *testing.T) {
|
||||
assert.NoError(t, unittest.PrepareTestDatabase())
|
||||
|
||||
projects, _, err := GetProjects(db.DefaultContext, SearchOptions{RepoID: 1})
|
||||
projects, _, err := FindProjects(db.DefaultContext, SearchOptions{RepoID: 1})
|
||||
assert.NoError(t, err)
|
||||
|
||||
// 1 value for this repo exists in the fixtures
|
||||
assert.Len(t, projects, 1)
|
||||
|
||||
projects, _, err = GetProjects(db.DefaultContext, SearchOptions{RepoID: 3})
|
||||
projects, _, err = FindProjects(db.DefaultContext, SearchOptions{RepoID: 3})
|
||||
assert.NoError(t, err)
|
||||
|
||||
// 1 value for this repo exists in the fixtures
|
||||
|
Reference in New Issue
Block a user