1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-28 09:21:13 -05:00

Add support for searching users by email (#30908) (testifylint)

This commit is contained in:
Earl Warren 2024-10-06 08:28:43 +02:00
parent 122baf4de8
commit 1bee6fa839
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -145,7 +145,7 @@ func TestAPIUserSearchByEmail(t *testing.T) {
var results SearchResults
DecodeJSON(t, resp, &results)
assert.Equal(t, 1, len(results.Data))
assert.Len(t, results.Data, 1)
assert.Equal(t, query, results.Data[0].Email)
// no login user can not search user with private email
@ -163,6 +163,6 @@ func TestAPIUserSearchByEmail(t *testing.T) {
resp = MakeRequest(t, req, http.StatusOK)
DecodeJSON(t, resp, &results)
assert.Equal(t, 1, len(results.Data))
assert.Len(t, results.Data, 1)
assert.Equal(t, query, results.Data[0].Email)
}