Use more specific test methods (#24265)

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
KN4CK3R 2023-04-22 23:56:27 +02:00 committed by GitHub
parent ac384c4e1d
commit f1173d6879
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
41 changed files with 117 additions and 117 deletions

View file

@ -40,7 +40,7 @@ func TestFind(t *testing.T) {
var repoUnits []repo_model.RepoUnit
err = db.Find(db.DefaultContext, &opts, &repoUnits)
assert.NoError(t, err)
assert.EqualValues(t, repoUnitCount, len(repoUnits))
assert.Len(t, repoUnits, repoUnitCount)
cnt, err := db.Count(db.DefaultContext, &opts, new(repo_model.RepoUnit))
assert.NoError(t, err)