mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-04 13:50:39 +00:00
* 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:
parent
96b1315e6e
commit
3d7d750a99
6 changed files with 33 additions and 7 deletions
|
@ -368,6 +368,8 @@ func TestCreateUser_Issue5882(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestGetUserIDsByNames(t *testing.T) {
|
||||
assert.NoError(t, PrepareTestDatabase())
|
||||
|
||||
// ignore non existing
|
||||
IDs, err := GetUserIDsByNames([]string{"user1", "user2", "none_existing_user"}, true)
|
||||
assert.NoError(t, err)
|
||||
|
@ -380,6 +382,8 @@ func TestGetUserIDsByNames(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestGetMaileableUsersByIDs(t *testing.T) {
|
||||
assert.NoError(t, PrepareTestDatabase())
|
||||
|
||||
results, err := GetMaileableUsersByIDs([]int64{1, 4}, false)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, 1, len(results))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue