Added tests for closed database behaviour
This commit is contained in:
@@ -10,6 +10,18 @@ open_single_database_test() ->
|
||||
{ok, _C1} = esqlite3:open("test.db"),
|
||||
ok.
|
||||
|
||||
close_test() ->
|
||||
{ok, C} = esqlite3:open(":memory:"),
|
||||
ok = esqlite3:close(C),
|
||||
|
||||
{error, closed} = esqlite3:set_update_hook(self(), C),
|
||||
{error, closed} = esqlite3:changes(C),
|
||||
{error, closed} = esqlite3:get_autocommit(C),
|
||||
|
||||
{error, _} = esqlite3:exec("create table test(one, two, three)", C),
|
||||
|
||||
ok.
|
||||
|
||||
open_multiple_same_databases_test() ->
|
||||
{ok, _C1} = esqlite3:open("test.db"),
|
||||
{ok, _C2} = esqlite3:open("test.db"),
|
||||
|
||||
Reference in New Issue
Block a user