2
0

Skip jsonb test if no jsonb type

This commit is contained in:
Jack Christensen
2017-03-20 08:58:28 -05:00
parent ed8bfa4f42
commit 120da8df8f
+6
View File
@@ -9,6 +9,12 @@ import (
)
func TestJsonbTranscode(t *testing.T) {
conn := mustConnectPgx(t)
defer mustClose(t, conn)
if _, ok := conn.ConnInfo.DataTypeForName("jsonb"); !ok {
t.Skip("Skipping due to no jsonb type")
}
testSuccessfulTranscode(t, "jsonb", []interface{}{
pgtype.Jsonb{Bytes: []byte("{}"), Status: pgtype.Present},
pgtype.Jsonb{Bytes: []byte("null"), Status: pgtype.Present},