test: fill remaining V1 test coverage

Add JSONB, pointer/filter, MustFetchOne, and dialect logger registration
tests for dbxm and dbxp.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-29 17:51:17 -07:00
parent 7647884464
commit 29b855f2b9
5 changed files with 121 additions and 0 deletions
+13
View File
@@ -78,3 +78,16 @@ func TestFetchOne_NilWhenEmpty(t *testing.T) {
require.NoError(t, err)
assert.Nil(t, result)
}
func TestMustFetchOne_NotFound(t *testing.T) {
errNotFound := errors.New("not found")
stmt := mockStatement{
queryContextFn: func(_ context.Context, _ any) error {
return ErrNoRows
},
}
result, err := MustFetchOne[row](mockQueryable{}, stmt, errNotFound)
assert.Nil(t, result)
assert.ErrorIs(t, err, errNotFound)
}