Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

123456789101112131415161718192021222324252627282930
  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. "code.gitea.io/gitea/modules/setting"
  9. )
  10. func TestSignup(t *testing.T) {
  11. defer prepareTestEnv(t)()
  12. setting.Service.EnableCaptcha = false
  13. req := NewRequestWithValues(t, "POST", "/user/sign_up", map[string]string{
  14. "user_name": "exampleUser",
  15. "email": "exampleUser@example.com",
  16. "password": "examplePassword!1",
  17. "retype": "examplePassword!1",
  18. })
  19. MakeRequest(t, req, http.StatusFound)
  20. // should be able to view new user's page
  21. req = NewRequest(t, "GET", "/exampleUser")
  22. MakeRequest(t, req, http.StatusOK)
  23. }