forked from forgejo/forgejo
Do some missing checks (#28423)
(cherry picked from commit 717d0f5934
)
Conflicts:
routers/api/v1/api.go
trivial contextual conflict
This commit is contained in:
parent
5528072d04
commit
7aa1e1a54d
3 changed files with 62 additions and 3 deletions
23
tests/integration/project_test.go
Normal file
23
tests/integration/project_test.go
Normal file
|
@ -0,0 +1,23 @@
|
|||
// Copyright 2023 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package integration
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"testing"
|
||||
|
||||
"code.gitea.io/gitea/tests"
|
||||
)
|
||||
|
||||
func TestPrivateRepoProject(t *testing.T) {
|
||||
defer tests.PrepareTestEnv(t)()
|
||||
|
||||
// not logged in user
|
||||
req := NewRequest(t, "GET", "/user31/-/projects")
|
||||
MakeRequest(t, req, http.StatusNotFound)
|
||||
|
||||
sess := loginUser(t, "user1")
|
||||
req = NewRequest(t, "GET", "/user31/-/projects")
|
||||
sess.MakeRequest(t, req, http.StatusOK)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue