summaryrefslogtreecommitdiffstats
path: root/integrations/signup_test.go
Commit message (Collapse)AuthorAgeFilesLines
* Remove legacy unmaintained packages, refactor to support change default ↵wxiaoguang2022-04-031-4/+4
| | | | | | | | | | locale (#19308) Remove two unmaintained vendor packages `i18n` and `paginater`. Changes: * Rewrite `i18n` package with a more clear fallback mechanism. Fix an unstable `Tr` behavior, add more tests. * Refactor the legacy `Paginater` to `Paginator`, test cases are kept unchanged. Trivial enhancement (no breaking for end users): * Use the first locale in LANGS setting option as the default, add a log to prevent from surprising users.
* Update HTTP status codes to modern codes (#18063)KN4CK3R2022-03-231-3/+3
| | | | | | * 2xx/3xx/4xx/5xx -> http.Status... * http.StatusFound -> http.StatusTemporaryRedirect * http.StatusMovedPermanently -> http.StatusPermanentRedirect
* Move user related model into models/user (#17781)Lunny Xiao2021-11-241-2/+2
| | | | | | | | | | | | | * Move user related model into models/user * Fix lint for windows * Fix windows lint * Fix windows lint * Move some tests in models * Merge
* A better go code formatter, and now `make fmt` can run in Windows (#17684)wxiaoguang2021-11-171-0/+1
| | | | * go build / format tools * re-format imports
* Decouple unit test, remove intermediate `unittestbridge` package (#17662)wxiaoguang2021-11-161-2/+2
| | | Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Move db related basic functions to models/db (#17075)Lunny Xiao2021-09-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * Move db related basic functions to models/db * Fix lint * Fix lint * Fix test * Fix lint * Fix lint * revert unnecessary change * Fix test * Fix wrong replace string * Use *Context * Correct committer spelling and fix wrong replaced words Co-authored-by: zeripath <art27@cantab.net>
* add configuration option to restrict users by default (#16256)Richard Nienaber2021-07-151-0/+23
| | | | | | | | | | | | | | | | | | * add configuration option to restrict users by default * default IsRestricted permission only set on sign up setting this in the model messes with other workflows (e.g. syncing LDAP users) where the IsRestricted permission needs to be explicitly set and not overridden by a config value * fix formatting * Apply suggestions from code review * ensure newly created user is set to restricted * ensure imports are in the correct order Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add email validity check (#13475)Chris Shyi2020-11-141-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Improve error feedback for duplicate deploy keys Instead of a generic HTTP 500 error page, a flash message is rendered with the deploy key page template so inform the user that a key with the intended title already exists. * API returns 422 error when key with name exists * Add email validity checking Add email validity checking for the following routes: [Web interface] 1. User registration 2. User creation by admin 3. Adding an email through user settings [API] 1. POST /admin/users 2. PATCH /admin/users/:username 3. POST /user/emails * Add further tests * Add signup email tests * Add email validity check for linking existing account * Address PR comments * Remove unneeded DB session * Move email check to updateUser Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix "data race" in testlogger (#9159)zeripath2019-11-261-1/+1
| | | | | | * Fix data race in testlogger * Update git_helper_for_declarative_test.go
* Fix password complexity check on registration (#8887)guillep2k2019-11-091-2/+2
| | | | | | * Fix registration password complexity * Fix integration to use a complex password ;)
* Less verbose integration tests (#2123)Ethan Koenig2017-07-071-6/+2
| | | * Helper functions for intergration test boilerplate
* Improve integration test helper functions (#2049)Ethan Koenig2017-06-251-1/+0
| | | Set request headers in helper functions, and new helper for requests with string-formatted URLs
* Consolidate boilerplate in integration tests (#1979)Ethan Koenig2017-06-171-10/+6
|
* Display URLs in integration test logs (#1924)Ethan Koenig2017-06-091-4/+2
|
* improve integration test to resue models/fixtures and store git repos with ↵Lunny Xiao2017-04-281-2/+2
| | | | | | | | | | tests (#1627) * improve integration test to resue models/fixtures and store git repos with source * use gitea-integration-meta dir instead .tar.gz and cleanup every before every test * fix import package name
* Integration test framework (#1290)Ethan Koenig2017-04-251-22/+28
| | | | | | | | | | * Integration test framework * udpate drone sign * Formatting fixes and move router.go to routers/ * update sign for drone
* Run "make fmt" with go-1.6 (#1333)Sandro Santilli2017-03-211-3/+3
|
* Add integration test for signup (#1135)Mura Li2017-03-111-0/+35
* Add integration test for signup * Remove unused functions * Refactoring * Add repo_create_test.go * Rollback the incomplete repo create test * Comply with linter requirements and simplify the code a little bit