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.

33 lines
669 B

  1. // Copyright 2017 The Gitea Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package integrations
  5. import (
  6. "net/http"
  7. "testing"
  8. )
  9. func TestLinksNoLogin(t *testing.T) {
  10. prepareTestEnv(t)
  11. var links = []string{
  12. "/explore/repos",
  13. "/explore/repos?q=test&tab=",
  14. "/explore/users",
  15. "/explore/users?q=test&tab=",
  16. "/explore/organizations",
  17. "/explore/organizations?q=test&tab=",
  18. "/",
  19. "/user/sign_up",
  20. "/user/login",
  21. "/user/forgot_password",
  22. "/swagger",
  23. }
  24. for _, link := range links {
  25. req := NewRequest(t, "GET", link)
  26. MakeRequest(t, req, http.StatusOK)
  27. }
  28. }