mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-05 14:20:16 +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
|
@ -22,6 +22,7 @@ import (
|
|||
"code.gitea.io/gitea/tests"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestAPIViewPulls(t *testing.T) {
|
||||
|
@ -44,7 +45,7 @@ func TestAPIViewPulls(t *testing.T) {
|
|||
if assert.EqualValues(t, 5, pull.ID) {
|
||||
resp = ctx.Session.MakeRequest(t, NewRequest(t, "GET", pull.DiffURL), http.StatusOK)
|
||||
_, err := io.ReadAll(resp.Body)
|
||||
assert.NoError(t, err)
|
||||
require.NoError(t, err)
|
||||
// TODO: use diff to generate stats to test against
|
||||
|
||||
t.Run(fmt.Sprintf("APIGetPullFiles_%d", pull.ID),
|
||||
|
@ -248,7 +249,7 @@ func TestAPIEditPull(t *testing.T) {
|
|||
// check comment history
|
||||
pull := unittest.AssertExistsAndLoadBean(t, &issues_model.PullRequest{ID: apiPull.ID})
|
||||
err := pull.LoadIssue(db.DefaultContext)
|
||||
assert.NoError(t, err)
|
||||
require.NoError(t, err)
|
||||
unittest.AssertExistsAndLoadBean(t, &issues_model.Comment{IssueID: pull.Issue.ID, OldTitle: title, NewTitle: newTitle})
|
||||
unittest.AssertExistsAndLoadBean(t, &issues_model.ContentHistory{IssueID: pull.Issue.ID, ContentText: newBody, IsFirstCreated: false})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue