summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/sql/data/error-notransaction.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/sql/data/error-notransaction.js')
-rw-r--r--tests/auto/declarative/sql/data/error-notransaction.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/declarative/sql/data/error-notransaction.js b/tests/auto/declarative/sql/data/error-notransaction.js
new file mode 100644
index 0000000..b9cc647
--- /dev/null
+++ b/tests/auto/declarative/sql/data/error-notransaction.js
@@ -0,0 +1,15 @@
+function test() {
+ var db = openDatabaseSync("QmlTestDB-data/error-notransaction", "1.0", "Test database from Qt autotests", 1000000);
+ var r="transaction_not_finished";
+
+ try {
+ db.transaction();
+ } catch (err) {
+ if (err.message == "transaction: missing callback")
+ r = "passed";
+ else
+ r = "WRONG ERROR="+err.message;
+ }
+
+ return r;
+}