Add missing untestable test.
This commit is contained in:
parent
ae48f26798
commit
0249bd0e6c
1 changed files with 13 additions and 0 deletions
13
tests/untestable/tpostgres.nim
Normal file
13
tests/untestable/tpostgres.nim
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import db_postgres
|
||||
|
||||
let db = open("localhost", "dom", "", "test")
|
||||
db.exec(sql"DROP TABLE IF EXISTS myTable")
|
||||
db.exec(sql("""CREATE TABLE myTable (
|
||||
id integer PRIMARY KEY,
|
||||
name varchar(50) not null)"""))
|
||||
let name = "Dom"
|
||||
db.exec(sql"INSERT INTO myTable (id, name) VALUES (0, ?)",
|
||||
name)
|
||||
doAssert db.getValue(sql"SELECT name FROM myTable") == name
|
||||
|
||||
db.close()
|
||||
Loading…
Add table
Add a link
Reference in a new issue