mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-21 16:40:52 +00:00
enable linter testifylint on v7 (#4572)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4572 Co-authored-by: TheFox0x7 <thefox0x7@gmail.com> Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
This commit is contained in:
parent
c47bdf436b
commit
072dd9f8bc
494 changed files with 4897 additions and 4554 deletions
|
@ -12,6 +12,7 @@ import (
|
|||
webhook_module "code.gitea.io/gitea/modules/webhook"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func Test_AddPayloadVersionToHookTaskTable(t *testing.T) {
|
||||
|
@ -40,14 +41,14 @@ func Test_AddPayloadVersionToHookTaskTable(t *testing.T) {
|
|||
return
|
||||
}
|
||||
|
||||
assert.NoError(t, AddPayloadVersionToHookTaskTable(x))
|
||||
require.NoError(t, AddPayloadVersionToHookTaskTable(x))
|
||||
|
||||
expected := []HookTaskMigrated{}
|
||||
assert.NoError(t, x.Table("hook_task_migrated").Asc("id").Find(&expected))
|
||||
require.NoError(t, x.Table("hook_task_migrated").Asc("id").Find(&expected))
|
||||
assert.Len(t, expected, 2)
|
||||
|
||||
got := []HookTaskMigrated{}
|
||||
assert.NoError(t, x.Table("hook_task").Asc("id").Find(&got))
|
||||
require.NoError(t, x.Table("hook_task").Asc("id").Find(&got))
|
||||
|
||||
for i, expected := range expected {
|
||||
expected, got := expected, got[i]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue