summaryrefslogtreecommitdiff
path: root/error_buffer_test.go
blob: 834369c1edd80c0443bbc9f364616c6b7efaf57b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package roadrunner

import (
	"testing"
	"bytes"
	"github.com/stretchr/testify/assert"
)

func TestErrBuffer_Write_Len(t *testing.T) {
	buf := &errBuffer{buffer: new(bytes.Buffer)}
	buf.Write([]byte("hello"))
	assert.Equal(t, 5, buf.Len())
	assert.Equal(t, buf.String(), "hello")
}