mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-21 17:41:16 +02:00
Enable testifylint rules (#34075)
Some checks failed
Some checks failed
enable testifylint rules disabled in: https://github.com/go-gitea/gitea/pull/34054
This commit is contained in:
@@ -46,7 +46,7 @@ owner/repo!123456789
|
||||
contentBytes := []byte(test)
|
||||
convertFullHTMLReferencesToShortRefs(re, &contentBytes)
|
||||
result := string(contentBytes)
|
||||
assert.EqualValues(t, expect, result)
|
||||
assert.Equal(t, expect, result)
|
||||
}
|
||||
|
||||
func TestFindAllIssueReferences(t *testing.T) {
|
||||
@@ -283,9 +283,9 @@ func testFixtures(t *testing.T, fixtures []testFixture, context string) {
|
||||
}
|
||||
expref := rawToIssueReferenceList(expraw)
|
||||
refs := FindAllIssueReferencesMarkdown(fixture.input)
|
||||
assert.EqualValues(t, expref, refs, "[%s] Failed to parse: {%s}", context, fixture.input)
|
||||
assert.Equal(t, expref, refs, "[%s] Failed to parse: {%s}", context, fixture.input)
|
||||
rawrefs := findAllIssueReferencesMarkdown(fixture.input)
|
||||
assert.EqualValues(t, expraw, rawrefs, "[%s] Failed to parse: {%s}", context, fixture.input)
|
||||
assert.Equal(t, expraw, rawrefs, "[%s] Failed to parse: {%s}", context, fixture.input)
|
||||
}
|
||||
|
||||
// Restore for other tests that may rely on the original value
|
||||
@@ -294,7 +294,7 @@ func testFixtures(t *testing.T, fixtures []testFixture, context string) {
|
||||
|
||||
func TestFindAllMentions(t *testing.T) {
|
||||
res := FindAllMentionsBytes([]byte("@tasha, @mike; @lucy: @john"))
|
||||
assert.EqualValues(t, []RefSpan{
|
||||
assert.Equal(t, []RefSpan{
|
||||
{Start: 0, End: 6},
|
||||
{Start: 8, End: 13},
|
||||
{Start: 15, End: 20},
|
||||
@@ -554,7 +554,7 @@ func TestParseCloseKeywords(t *testing.T) {
|
||||
res := pat.FindAllStringSubmatch(test.match, -1)
|
||||
assert.Len(t, res, 1)
|
||||
assert.Len(t, res[0], 2)
|
||||
assert.EqualValues(t, test.expected, res[0][1])
|
||||
assert.Equal(t, test.expected, res[0][1])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user