mirror of
https://github.com/go-gitea/gitea
synced 2025-07-05 18:17:19 +00:00
Refactor older tests to use testify (#33140)
Refactor checks to use assert/require Use require.Eventually for waiting in elastic and meilisearch tests Use require to exit early instead of assert
This commit is contained in:
@ -5,6 +5,8 @@ package utils
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestSanitizeFlashErrorString(t *testing.T) {
|
||||
@ -32,9 +34,8 @@ func TestSanitizeFlashErrorString(t *testing.T) {
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
if got := SanitizeFlashErrorString(tt.arg); got != tt.want {
|
||||
t.Errorf("SanitizeFlashErrorString() = '%v', want '%v'", got, tt.want)
|
||||
}
|
||||
got := SanitizeFlashErrorString(tt.arg)
|
||||
assert.Equal(t, tt.want, got)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user