1
0
Fork 0
forked from forgejo/forgejo

Fix individual tests (addition to #15802) (#15818)

* Decouple TestAction_GetRepoLink and TestSizedAvatarLink.

* Load database for TestCheckGPGUserEmail.

* Load database for TestMakeIDsFromAPIAssigneesToAdd.

* Load database for TestGetUserIDsByNames and TestGetMaileableUsersByIDs.

* Load database for TestUser_ToUser.

* Load database for TestRepository_EditWikiPage.

* Include AppSubURL in test.

* Prevent panic with empty slice.

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
KN4CK3R 2021-05-12 06:13:42 +02:00 committed by GitHub
parent 96b1315e6e
commit 3d7d750a99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 33 additions and 7 deletions

View file

@ -162,6 +162,8 @@ func TestRepository_AddWikiPage(t *testing.T) {
}
func TestRepository_EditWikiPage(t *testing.T) {
assert.NoError(t, models.PrepareTestDatabase())
const newWikiContent = "This is the new content"
const commitMsg = "Commit message"
repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository)