[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[2563] trunk
- Subject: SF.net SVN: ledger-smb:[2563] trunk
- From: ..hidden..
- Date: Wed, 15 Apr 2009 05:14:22 +0000
Revision: 2563
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2563&view=rev
Author: einhverfr
Date: 2009-04-15 05:14:22 +0000 (Wed, 15 Apr 2009)
Log Message:
-----------
Test case update
Modified Paths:
--------------
trunk/sql/modules/test/Reconciliation.sql
trunk/t/43-dbtest.t
Modified: trunk/sql/modules/test/Reconciliation.sql
===================================================================
--- trunk/sql/modules/test/Reconciliation.sql 2009-04-14 19:01:22 UTC (rev 2562)
+++ trunk/sql/modules/test/Reconciliation.sql 2009-04-15 05:14:22 UTC (rev 2563)
@@ -8,6 +8,12 @@
INSERT INTO users (id, entity_id, username) values (-50, -50, SESSION_USER);
INSERT INTO test_result(test_name, success)
+SELECT 'check_prefix set', count(*) = 1
+FROM defaults where setting_key = 'check_prefix';
+
+update defaults set value = 'Recon gl test ' where setting_key = 'check_prefix';
+
+INSERT INTO test_result(test_name, success)
SELECT 'Create Recon Report',
reconciliation__new_report_id(-200, 100, now()::date) > 0;
@@ -24,8 +30,14 @@
INSERT INTO test_result(test_name, success)
SELECT 'Correct number of report lines', count(*) = 10 from cr_report_line where report_id = currval('cr_report_id_seq')::int;
+\echo matching tests
+select reconciliation__add_entry(currval('cr_report_id_seq')::int, '1', 'GL', '2001-01-01'::timestamp, '10');
INSERT INTO test_result(test_name, success)
+select 'Match 1 is correct', their_balance = our_balance
+from cr_report_line where scn = 'Recon gl test 1';
+
+INSERT INTO test_result(test_name, success)
SELECT 'Report Submitted', reconciliation__submit_set(currval('cr_report_id_seq')::int, (select as_array(id::int) from cr_report_line where report_id = currval('cr_report_id_seq')::int));
INSERT INTO test_result(test_name, success)
@@ -110,6 +122,8 @@
INSERT INTO test_result(test_name, success)
SELECT 'Cleared balance post-approval is 130', reconciliation__get_cleared_balance(-201) = 130;
+select * from cr_report_line where report_id = currval('cr_report_id_seq')::int;
+
SELECT * FROM test_result;
SELECT (select count(*) from test_result where success is true)
Modified: trunk/t/43-dbtest.t
===================================================================
--- trunk/t/43-dbtest.t 2009-04-14 19:01:22 UTC (rev 2562)
+++ trunk/t/43-dbtest.t 2009-04-15 05:14:22 UTC (rev 2563)
@@ -5,7 +5,7 @@
plan skip_all => 'Skipping all. Told not to test db.';
}
else {
- plan tests => 86;
+ plan tests => 88;
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.