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

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

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")
}