test: use decompressed.String() instead of string(decompressed.Bytes())

This commit is contained in:
albertony 2022-08-21 20:46:31 +02:00
parent bb92af693a
commit 92fb644fb6

View File

@ -38,7 +38,7 @@ func TestGzipReader(t *testing.T) {
require.NoError(t, err)
_, err = io.Copy(&decompressed, zr)
require.NoError(t, err)
assert.Equal(t, data, string(decompressed.Bytes()))
assert.Equal(t, data, decompressed.String())
// Check the underlying close gets called
assert.False(t, cc.closed)