diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2023-12-12 13:01:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-12 05:01:17 +0000 |
commit | 717d0f5934826e0ddfdce176cf3cab303cd74fbb (patch) | |
tree | 51d7fb840679d32105240d33b782b05a063bb8a0 /tests/integration/project_test.go | |
parent | 4e879fed90665331d2a57e5abee9e0f02372c470 (diff) | |
download | gitea-717d0f5934826e0ddfdce176cf3cab303cd74fbb.tar.gz gitea-717d0f5934826e0ddfdce176cf3cab303cd74fbb.zip |
Do some missing checks (#28423)
Diffstat (limited to 'tests/integration/project_test.go')
-rw-r--r-- | tests/integration/project_test.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/integration/project_test.go b/tests/integration/project_test.go new file mode 100644 index 0000000000..45061c5b24 --- /dev/null +++ b/tests/integration/project_test.go @@ -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) +} |