mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-31 22:46:45 +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
|
@ -19,10 +19,11 @@ import (
|
|||
"code.gitea.io/gitea/tests"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestAPIModifyLabels(t *testing.T) {
|
||||
assert.NoError(t, unittest.LoadFixtures())
|
||||
require.NoError(t, unittest.LoadFixtures())
|
||||
|
||||
repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 2})
|
||||
owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID})
|
||||
|
@ -94,7 +95,7 @@ func TestAPIModifyLabels(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestAPIAddIssueLabels(t *testing.T) {
|
||||
assert.NoError(t, unittest.LoadFixtures())
|
||||
require.NoError(t, unittest.LoadFixtures())
|
||||
|
||||
repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1})
|
||||
issue := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{RepoID: repo.ID})
|
||||
|
@ -160,7 +161,7 @@ func TestAPIAddIssueLabelsAutoDate(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestAPIReplaceIssueLabels(t *testing.T) {
|
||||
assert.NoError(t, unittest.LoadFixtures())
|
||||
require.NoError(t, unittest.LoadFixtures())
|
||||
|
||||
repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1})
|
||||
issue := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{RepoID: repo.ID})
|
||||
|
@ -186,7 +187,7 @@ func TestAPIReplaceIssueLabels(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestAPIModifyOrgLabels(t *testing.T) {
|
||||
assert.NoError(t, unittest.LoadFixtures())
|
||||
require.NoError(t, unittest.LoadFixtures())
|
||||
|
||||
repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 3})
|
||||
owner := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: repo.OwnerID})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue