mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 05:52:43 +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:
parent
0c048e554b
commit
6fe3c8b398
30 changed files with 1556 additions and 176 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue