mirror of https://github.com/go-gitea/gitea.git
Fix project test to recover the changes of global variable
This commit is contained in:
parent
94ea1bed2a
commit
ca73f6c78e
|
@ -14,8 +14,12 @@ import (
|
|||
func TestOrgProjectAccess(t *testing.T) {
|
||||
defer tests.PrepareTestEnv(t)()
|
||||
|
||||
oldDisabledRepoUnits := unit_model.DisabledRepoUnits
|
||||
// disable repo project unit
|
||||
unit_model.DisabledRepoUnits = []unit_model.Type{unit_model.TypeProjects}
|
||||
defer func() {
|
||||
unit_model.DisabledRepoUnits = oldDisabledRepoUnits
|
||||
}()
|
||||
|
||||
// repo project, 404
|
||||
req := NewRequest(t, "GET", "/user2/repo1/projects")
|
||||
|
|
Loading…
Reference in New Issue