[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[4816] trunk
- Subject: SF.net SVN: ledger-smb:[4816] trunk
- From: ..hidden..
- Date: Thu, 31 May 2012 12:55:24 +0000
Revision: 4816
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4816&view=rev
Author: einhverfr
Date: 2012-05-31 12:55:23 +0000 (Thu, 31 May 2012)
Log Message:
-----------
Added multi-run safety checks for COGS
Modified Paths:
--------------
trunk/sql/modules/test/COGS-FIFO.sql
trunk/t/43-dbtest.t
Modified: trunk/sql/modules/test/COGS-FIFO.sql
===================================================================
--- trunk/sql/modules/test/COGS-FIFO.sql 2012-05-31 12:49:34 UTC (rev 4815)
+++ trunk/sql/modules/test/COGS-FIFO.sql 2012-05-31 12:55:23 UTC (rev 4816)
@@ -607,8 +607,15 @@
WHERE trans_id = -4204 and chart_id = -4102;
INSERT INTO test_result(test_name, success)
-SELECT 'multi-call safety, ap reversal', cogs__add_for_ap_line(-4204) = 0;
+SELECT 'multi-call-safe ar cogs, id ' || i.id, cogs__add_for_ar_line(i.id) = 0
+ FROM invoice i JOIN ar ON ar.id = i.trans_id
+ WHERE i.id < -1000;
+INSERT INTO test_result(test_name, success)
+SELECT 'multi-call-safe ap cogs, id ' || i.id, cogs__add_for_ap_line(i.id) = 0
+ FROM invoice i JOIN ap ON ap.id = i.trans_id
+ WHERE i.id < -1000;
+
-- finalization
SELECT sum(amount) as balance, chart_id, trans_id from acc_trans
WHERE trans_id < -1000
Modified: trunk/t/43-dbtest.t
===================================================================
--- trunk/t/43-dbtest.t 2012-05-31 12:49:34 UTC (rev 4815)
+++ trunk/t/43-dbtest.t 2012-05-31 12:55:23 UTC (rev 4816)
@@ -5,7 +5,7 @@
plan skip_all => 'Skipping all. Told not to test db.';
}
else {
- plan tests => 242;
+ plan tests => 261;
if (defined $ENV{LSMB_NEW_DB}){
$ENV{PGDATABASE} = $ENV{LSMB_NEW_DB};
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.