Semaphore/db/sql/SqlDb_test.go

15 lines
325 B
Go
Raw Normal View History

2021-08-24 17:20:34 +02:00
package sql
import (
"github.com/go-gorp/gorp/v3"
"testing"
)
func TestValidatePort(t *testing.T) {
d := SqlDb{}
q := d.prepareQueryWithDialect("select * from `test` where id = ?, email = ?", gorp.PostgresDialect{})
if q != "select * from \"test\" where id = $1, email = $2" {
t.Error("invalid postgres query")
}
2023-07-03 01:41:13 +02:00
}