Refactored and united raw and ORM api tests

This commit is contained in:
Florian "flowdy" Heß
2016-07-04 20:21:47 +02:00
parent 3985b46224
commit bc37ee316b
5 changed files with 25 additions and 7 deletions

View File

@@ -9,9 +9,9 @@ john: 0 +0 0
Club: 0 +0 -16250
alex: 7200 +16250 0
# Some updates and deletes that could, unless denied, destroy consistency ...
Error: near line 409: paid is set and adjusted automatically according to added Transfer records
Error: near line 410: Debt is involved in transfers to revoke at first
Error: near line 411: FOREIGN KEY constraint failed
Error: near line 41: paid is set and adjusted automatically according to added Transfer records
Error: near line 42: Debt is involved in transfers to revoke at first
Error: near line 43: FOREIGN KEY constraint failed
# After revoking transactions, you are free to change or delete debts and credits ...
Club: 7200 +0 0
alex: 0 +0 0

View File

@@ -1 +1,4 @@
diff t/schema.out <(cat {,t/}schema.sql | sqlite3 2>&1)
echo "My database file: $1"
if sqlite3 $1 < schema.sql; then
diff t/schema.out <(sqlite3 $1 < t/schema.sql 2>&1)
fi

View File

@@ -1,7 +1,7 @@
use strict;
my $db;
use TrsrDB \$db => 'trsr.db';
use TrsrDB \$db => $ENV{TRSRDB_SQLITE_FILE};
use Test::More;
$db->resultset("Account")->create({ ID => "Club", altId => 1, type => 'eV' });