MCPcopy Create free account
hub / github.com/DATA-DOG/go-sqlmock / TestWithOptions

Function TestWithOptions

driver_test.go:101–111  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

99}
100
101func TestWithOptions(t *testing.T) {
102 c := &converter{}
103 _, mock, err := New(ValueConverterOption(c))
104 if err != nil {
105 t.Errorf("expected no error, but got: %s", err)
106 }
107 smock, _ := mock.(*sqlmock)
108 if smock.converter.(*converter) != c {
109 t.Errorf("expected a custom converter to be set")
110 }
111}
112
113func TestWrongDSN(t *testing.T) {
114 t.Parallel()

Callers

nothing calls this directly

Calls 2

NewFunction · 0.85
ValueConverterOptionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…