Updated integration tests

This commit is contained in:
Fredy 2022-09-01 19:59:08 +02:00
parent 17483ee199
commit 3b87ab2255
2 changed files with 4 additions and 2 deletions

View File

@ -181,9 +181,10 @@ end)
TestFramework:RegisterTest("[Prepared Query] should return correct error", function(test)
local db = TestFramework:ConnectToDatabase()
local qu = db:prepare("SEsdg")
function qu:onError(err)
function qu:onError(err, sql)
test:shouldBeEqual(qu:error(), err)
test:shouldBeGreaterThan(#qu:error(), 0)
test:shouldBeEqual(sql, "SEsdg")
test:Complete()
end
qu:start()

View File

@ -121,8 +121,9 @@ end)
TestFramework:RegisterTest("[Query] should return correct error", function(test)
local db = TestFramework:ConnectToDatabase()
local qu = db:query("SEsdg")
function qu:onError(err)
function qu:onError(err, sql)
test:shouldBeEqual(qu:error(), err)
test:shouldBeEqual(sql, "SEsdg")
test:shouldBeGreaterThan(#qu:error(), 0)
test:Complete()
end