mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-10-27 20:41:01 +00:00
enable linter testifylint on v8 (#4573)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4573 Co-authored-by: TheFox0x7 <thefox0x7@gmail.com> Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
This commit is contained in:
parent
4d2263e82e
commit
ce563ade3d
503 changed files with 5014 additions and 4665 deletions
|
|
@ -28,6 +28,7 @@ import (
|
|||
"code.gitea.io/gitea/tests"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestRepoSettingsUnits(t *testing.T) {
|
||||
|
|
@ -63,12 +64,12 @@ func TestRepoAddMoreUnitsHighlighting(t *testing.T) {
|
|||
setUserHints := func(t *testing.T, hints bool) func() {
|
||||
saved := user.EnableRepoUnitHints
|
||||
|
||||
assert.NoError(t, user_service.UpdateUser(db.DefaultContext, user, &user_service.UpdateOptions{
|
||||
require.NoError(t, user_service.UpdateUser(db.DefaultContext, user, &user_service.UpdateOptions{
|
||||
EnableRepoUnitHints: optional.Some(hints),
|
||||
}))
|
||||
|
||||
return func() {
|
||||
assert.NoError(t, user_service.UpdateUser(db.DefaultContext, user, &user_service.UpdateOptions{
|
||||
require.NoError(t, user_service.UpdateUser(db.DefaultContext, user, &user_service.UpdateOptions{
|
||||
EnableRepoUnitHints: optional.Some(saved),
|
||||
}))
|
||||
}
|
||||
|
|
@ -178,7 +179,7 @@ func TestRepoAddMoreUnits(t *testing.T) {
|
|||
|
||||
// Disable the Packages unit
|
||||
err := repo_service.UpdateRepositoryUnits(db.DefaultContext, repo, nil, []unit_model.Type{unit_model.TypePackages})
|
||||
assert.NoError(t, err)
|
||||
require.NoError(t, err)
|
||||
|
||||
assertAddMore(t, true)
|
||||
})
|
||||
|
|
@ -200,7 +201,7 @@ func TestRepoAddMoreUnits(t *testing.T) {
|
|||
|
||||
// Disable the Packages unit
|
||||
err := repo_service.UpdateRepositoryUnits(db.DefaultContext, repo, nil, []unit_model.Type{unit_model.TypePackages})
|
||||
assert.NoError(t, err)
|
||||
require.NoError(t, err)
|
||||
|
||||
// The "Add more" link appears no more
|
||||
assertAddMore(t, false)
|
||||
|
|
@ -223,7 +224,7 @@ func TestRepoAddMoreUnits(t *testing.T) {
|
|||
|
||||
// Disable the Issues unit
|
||||
err := repo_service.UpdateRepositoryUnits(db.DefaultContext, repo, nil, []unit_model.Type{unit_model.TypeIssues})
|
||||
assert.NoError(t, err)
|
||||
require.NoError(t, err)
|
||||
|
||||
// The "Add more" link appears no more
|
||||
assertAddMore(t, false)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue