diff options
Diffstat (limited to 'error_buffer_test.go')
-rw-r--r-- | error_buffer_test.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/error_buffer_test.go b/error_buffer_test.go new file mode 100644 index 00000000..ce252612 --- /dev/null +++ b/error_buffer_test.go @@ -0,0 +1,14 @@ +package roadrunner + +import ( + "testing" + "bytes" + "github.com/magiconair/properties/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") +} |