blob: f4ed529da332a219a2588903eb1dc1c45b964b0c [file] [log] [blame]
package loggingsyncbuffer
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestSyncWriter_WriteString_StringIsReturned(t *testing.T) {
sw := New()
const s = "Hello World!"
_, err := sw.Write([]byte(s))
assert.NoError(t, err)
assert.Equal(t, s, sw.String())
}
func TestSyncWriter_Sync_ReturnsNil(t *testing.T) {
sw := New()
assert.Nil(t, sw.Sync())
}