Files

24 lines
501 B
Go
Raw Permalink Normal View History

package test_test
import (
"strings"
"testing"
"queryorchestration/internal/test"
"github.com/stretchr/testify/assert"
)
func TestAssertStringToReader(t *testing.T) {
t.Run("pass", func(t *testing.T) {
mockT := &testing.T{}
test.AssertStringToReader(t, "hi", strings.NewReader("hi"))
assert.False(t, mockT.Failed())
})
t.Run("fail", func(t *testing.T) {
mockT := &testing.T{}
test.AssertStringToReader(mockT, "bye", strings.NewReader("hi"))
assert.True(t, mockT.Failed())
})
}