mydb/errors_test.go

15 lines
299 B
Go
Raw Normal View History

2023-09-18 15:15:42 +08:00
package mydb
import (
"errors"
"fmt"
"testing"
"github.com/stretchr/testify/assert"
)
func TestErrorWrap(t *testing.T) {
adapterFakeErr := fmt.Errorf("could not find item in %q: %w", "users", ErrCollectionDoesNotExist)
assert.True(t, errors.Is(adapterFakeErr, ErrCollectionDoesNotExist))
}