diff options
author | KN4CK3R <KN4CK3R@users.noreply.github.com> | 2021-05-12 06:13:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-12 00:13:42 -0400 |
commit | 3d7d750a999b72d422000154a0b1f2801614521e (patch) | |
tree | 59aa048dd42f9ffaea431093cd1e49d1c8d23cd7 /models/issue_assignees_test.go | |
parent | 96b1315e6eaf04954383348cbbb4d1ef7810651b (diff) | |
download | gitea-3d7d750a999b72d422000154a0b1f2801614521e.tar.gz gitea-3d7d750a999b72d422000154a0b1f2801614521e.zip |
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>
Diffstat (limited to 'models/issue_assignees_test.go')
-rw-r--r-- | models/issue_assignees_test.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/models/issue_assignees_test.go b/models/issue_assignees_test.go index 79257013f8..e0359b0b9f 100644 --- a/models/issue_assignees_test.go +++ b/models/issue_assignees_test.go @@ -61,6 +61,11 @@ func TestUpdateAssignee(t *testing.T) { } func TestMakeIDsFromAPIAssigneesToAdd(t *testing.T) { + assert.NoError(t, PrepareTestDatabase()) + + _ = AssertExistsAndLoadBean(t, &User{ID: 1}).(*User) + _ = AssertExistsAndLoadBean(t, &User{ID: 2}).(*User) + IDs, err := MakeIDsFromAPIAssigneesToAdd("", []string{""}) assert.NoError(t, err) assert.Equal(t, []int64{}, IDs) |