You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

project_test.go 496B

1234567891011121314151617181920212223
  1. // Copyright 2023 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package integration
  4. import (
  5. "net/http"
  6. "testing"
  7. "code.gitea.io/gitea/tests"
  8. )
  9. func TestPrivateRepoProject(t *testing.T) {
  10. defer tests.PrepareTestEnv(t)()
  11. // not logged in user
  12. req := NewRequest(t, "GET", "/user31/-/projects")
  13. MakeRequest(t, req, http.StatusNotFound)
  14. sess := loginUser(t, "user1")
  15. req = NewRequest(t, "GET", "/user31/-/projects")
  16. sess.MakeRequest(t, req, http.StatusOK)
  17. }