1
0
Fork 0
forked from forgejo/forgejo

Sort issue search results by revelance (#14353)

This commit is contained in:
Lauris BH 2021-01-16 06:55:17 +02:00 committed by GitHub
parent 2db4733c7d
commit 0a3c3357f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 5 deletions

View file

@ -299,7 +299,7 @@ func TestIssue_SearchIssueIDsByKeyword(t *testing.T) {
total, ids, err = SearchIssueIDsByKeyword("for", []int64{1}, 10, 0)
assert.NoError(t, err)
assert.EqualValues(t, 5, total)
assert.EqualValues(t, []int64{1, 2, 3, 5, 11}, ids)
assert.ElementsMatch(t, []int64{1, 2, 3, 5, 11}, ids)
// issue1's comment id 2
total, ids, err = SearchIssueIDsByKeyword("good", []int64{1}, 10, 0)