Use require/assert.Empty instead of require/assert.Len(t, X, 0) (#13413)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
fdd1ae974f
Коммит
b3e49ec45c
@@ -316,9 +316,9 @@ func TestTruncateOpenGraph(t *testing.T) {
|
||||
assert.Nil(t, result.Book, "No book stored")
|
||||
assert.Nil(t, result.Profile, "No profile stored")
|
||||
assert.Len(t, result.Images, 5, "Only the first 5 images")
|
||||
assert.Len(t, result.Audios, 0, "No audios stored")
|
||||
assert.Len(t, result.Videos, 0, "No videos stored")
|
||||
assert.Len(t, result.LocalesAlternate, 0, "No alternate locales stored")
|
||||
assert.Empty(t, result.Audios, "No audios stored")
|
||||
assert.Empty(t, result.Videos, "No videos stored")
|
||||
assert.Empty(t, result.LocalesAlternate, "No alternate locales stored")
|
||||
assert.Equal(t, result.Determiner, "", "No determiner stored")
|
||||
assert.Equal(t, utf8.RuneCountInString(result.Title), 305, "Title text is truncated")
|
||||
assert.Equal(t, utf8.RuneCountInString(result.Description), 305, "Description text is truncated")
|
||||
|
||||
@@ -49,5 +49,5 @@ func TestSecurityBulletinsToFromJson(t *testing.T) {
|
||||
s2 := `{"wat"`
|
||||
b2 := SecurityBulletinsFromJson(strings.NewReader(s2))
|
||||
|
||||
require.Len(t, b2, 0)
|
||||
require.Empty(t, b2)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user