[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[2461] trunk



Revision: 2461
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2461&view=rev
Author:   einhverfr
Date:     2009-02-24 19:38:23 +0000 (Tue, 24 Feb 2009)

Log Message:
-----------
Adding more recon tests

Modified Paths:
--------------
    trunk/sql/modules/test/Reconciliation.sql
    trunk/t/04-template-handling.t
    trunk/t/43-dbtest.t

Modified: trunk/sql/modules/test/Reconciliation.sql
===================================================================
--- trunk/sql/modules/test/Reconciliation.sql	2009-02-24 18:20:24 UTC (rev 2460)
+++ trunk/sql/modules/test/Reconciliation.sql	2009-02-24 19:38:23 UTC (rev 2461)
@@ -33,7 +33,33 @@
 INSERT INTO test_result(test_name, success)
 SELECT 'Transactions closed', count(*) = 0 FROM acc_trans where chart_id = -200 and cleared is false;
 
+INSERT INTO test_result(test_name, success)
+SELECT 'Create Recon Report', 
+	reconciliation__new_report_id(-201, 100, now()::date) > 0;
 
+INSERT INTO test_result(test_name, success)
+SELECT 'Pending Transactions Ran', reconciliation__pending_transactions(now()::date, -201, currval('cr_report_id_seq')::int) > 0;
+
+INSERT INTO test_result(test_name, success)
+SELECT 'Correct number of GL groups', count(*) = 4 from cr_report_line where scn like '% gl %' and report_id = currval('cr_report_id_seq')::int;
+
+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;
+
+
+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)
+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)
+SELECT 'Report Approved', reconciliation__report_approve(currval('cr_report_id_seq')::int) > 0;
+
+INSERT INTO test_result(test_name, success)
+SELECT 'Transactions closed', count(*) = 0 FROM acc_trans where chart_id = -200 and cleared is false;
+
+
 SELECT * FROM test_result;
 
 SELECT (select count(*) from test_result where success is true) 

Modified: trunk/t/04-template-handling.t
===================================================================
--- trunk/t/04-template-handling.t	2009-02-24 18:20:24 UTC (rev 2460)
+++ trunk/t/04-template-handling.t	2009-02-24 19:38:23 UTC (rev 2461)
@@ -359,7 +359,8 @@
 my $number = Math::BigFloat->new(17.5);
 isa_ok($number, 'Math::BigFloat', 
 	'Template, private (_preprocess): number');
-$template->_preprocess($number);
+## Commending out the one below because it is not valid when Math::BigInt::GMP is loaded
+# $template->_preprocess($number);
 ## Commenting out these tests since currently the functionality is known broken
 ## and unused
 #cmp_ok($number, 'eq', '17,50',

Modified: trunk/t/43-dbtest.t
===================================================================
--- trunk/t/43-dbtest.t	2009-02-24 18:20:24 UTC (rev 2460)
+++ trunk/t/43-dbtest.t	2009-02-24 19:38:23 UTC (rev 2461)
@@ -5,7 +5,7 @@
 	plan skip_all => 'Skipping all.  Told not to test db.';
 }
 else {
-	plan tests => 64;
+	plan tests => 72;
 	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.