Skip to content

Commit

Permalink
Updated integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
FredyH committed Sep 1, 2022
1 parent 17483ee commit 3b87ab2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion IntegrationTest/lua/mysqloo/tests/prepared_query_tests.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 2 additions & 1 deletion IntegrationTest/lua/mysqloo/tests/query_tests.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3b87ab2

Please sign in to comment.