forked from forgejo/forgejo
Fix "access" fixtures and tests (#10247)
* Add fixture gen tool and fix "access" test * Close file before exiting * Add missing repo_unit for repo id: 5 * Fix count on TestAPIOrgRepos Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
parent
a97fe76950
commit
62a1322cf9
6 changed files with 193 additions and 45 deletions
|
@ -112,7 +112,7 @@ func TestUser_GetAccessibleRepositories(t *testing.T) {
|
|||
user2 := AssertExistsAndLoadBean(t, &User{ID: 2}).(*User)
|
||||
repos, err = user2.GetAccessibleRepositories(0)
|
||||
assert.NoError(t, err)
|
||||
assert.Len(t, repos, 1)
|
||||
assert.Len(t, repos, 4)
|
||||
|
||||
user29 := AssertExistsAndLoadBean(t, &User{ID: 29}).(*User)
|
||||
repos, err = user29.GetAccessibleRepositories(0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue