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

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



Revision: 3387
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3387&view=rev
Author:   einhverfr
Date:     2011-06-30 10:32:28 +0000 (Thu, 30 Jun 2011)

Log Message:
-----------
More 1099 tests

Modified Paths:
--------------
    trunk/sql/modules/test/Taxform.sql
    trunk/t/43-dbtest.t

Modified: trunk/sql/modules/test/Taxform.sql
===================================================================
--- trunk/sql/modules/test/Taxform.sql	2011-06-30 10:18:09 UTC (rev 3386)
+++ trunk/sql/modules/test/Taxform.sql	2011-06-30 10:32:28 UTC (rev 3387)
@@ -461,8 +461,140 @@
                                 'Test account 2')
     WHERE invoice_id = -1027;
 
+
+INSERT INTO test_result(test_name, success)
+   SELECT 'current report, invoice -1034, inv $1000', invoice_sum= 1000
+    FROM tax_form_details_report(-511, (date1() - '1 day'::interval)::date, 
+                                  (date1() + '1 day'::interval)::date, 
+                                'Test account 1')
+    WHERE invoice_id = -1034;
+
+INSERT INTO test_result(test_name, success)
+   SELECT 'current report, invoice -1035, inv $500', invoice_sum= 500
+    FROM tax_form_details_report(-511, (date1() - '1 day'::interval)::date, 
+                                  (date1() + '1 day'::interval)::date, 
+                                'Test account 1')
+    WHERE invoice_id = -1035;
+
+INSERT INTO test_result(test_name, success)
+   SELECT 'current report, invoice -1036, inv $500', invoice_sum= 500
+    FROM tax_form_details_report(-511, (date1() - '1 day'::interval)::date, 
+                                  (date1() + '1 day'::interval)::date, 
+                                'Test account 1')
+    WHERE invoice_id = -1036;
+
+INSERT INTO test_result(test_name, success)
+   SELECT 'current report, invoice -1037, inv $1000', invoice_sum= 1000
+    FROM tax_form_details_report(-511, (date1() - '1 day'::interval)::date, 
+                                  (date1() + '1 day'::interval)::date, 
+                                'Test account 2')
+    WHERE invoice_id = -1037;
+
+
+INSERT INTO test_result(test_name, success)
+   SELECT 'current report, invoice -1034, total $1000', total_sum= 1000
+    FROM tax_form_details_report(-511, (date1() - '1 day'::interval)::date, 
+                                  (date1() + '1 day'::interval)::date, 
+                                'Test account 1')
+    WHERE invoice_id = -1034;
+
+INSERT INTO test_result(test_name, success)
+   SELECT 'current report, invoice -1035, total $500', total_sum= 500
+    FROM tax_form_details_report(-511, (date1() - '1 day'::interval)::date, 
+                                  (date1() + '1 day'::interval)::date, 
+                                'Test account 1')
+    WHERE invoice_id = -1035;
+
+INSERT INTO test_result(test_name, success)
+   SELECT 'current report, invoice -1036, total $500', total_sum= 500
+    FROM tax_form_details_report(-511, (date1() - '1 day'::interval)::date, 
+                                  (date1() + '1 day'::interval)::date, 
+                                'Test account 1')
+    WHERE invoice_id = -1036;
+
+INSERT INTO test_result(test_name, success)
+   SELECT 'current report, invoice -1037, total $1000', total_sum= 500
+    FROM tax_form_details_report(-511, (date1() - '1 day'::interval)::date, 
+                                  (date1() + '1 day'::interval)::date, 
+                                'Test account 2')
+    WHERE invoice_id = -1037;
+
    
 
+INSERT INTO test_result(test_name, success)
+   SELECT 'current report, invoice -1034, acc 0', acc_sum = 0
+    FROM tax_form_details_report(-511, (date1() - '1 day'::interval)::date, 
+                                  (date1() + '1 day'::interval)::date, 
+                                'Test account 1')
+    WHERE invoice_id = -1034;
+
+INSERT INTO test_result(test_name, success)
+   SELECT 'current report, invoice -1035, acc 0', acc_sum = 0
+    FROM tax_form_details_report(-511, (date1() - '1 day'::interval)::date, 
+                                  (date1() + '1 day'::interval)::date, 
+                                'Test account 1')
+    WHERE invoice_id = -1035;
+
+INSERT INTO test_result(test_name, success)
+   SELECT 'current report, invoice -1036, acc 0',  acc_sum = 0
+    FROM tax_form_details_report(-511, (date1() - '1 day'::interval)::date, 
+                                  (date1() + '1 day'::interval)::date, 
+                                'Test account 1')
+    WHERE invoice_id = -1036;
+
+INSERT INTO test_result(test_name, success)
+   SELECT 'current report, invoice -1037, acc 0', acc_sum = 0
+    FROM tax_form_details_report(-511, (date1() - '1 day'::interval)::date, 
+                                  (date1() + '1 day'::interval)::date, 
+                                'Test account 2')
+    WHERE invoice_id = -1037;
+
+
+   
+INSERT INTO test_result(test_name, success)
+   SELECT 'future report, invoice -1026, acc 500',  acc_sum = 500
+    FROM tax_form_details_report(-511, (date2() - '1 day'::interval)::date, 
+                                  (date2() + '1 day'::interval)::date, 
+                                'Test account 1')
+    WHERE invoice_id = -1026;
+
+INSERT INTO test_result(test_name, success)
+   SELECT 'future report, invoice -1026, inv 0',  invoice_sum = 0
+    FROM tax_form_details_report(-511, (date2() - '1 day'::interval)::date, 
+                                  (date2() + '1 day'::interval)::date, 
+                                'Test account 1')
+    WHERE invoice_id = -1026;
+
+   
+INSERT INTO test_result(test_name, success)
+   SELECT 'future report, invoice -1026, total 500',  total_sum = 500
+    FROM tax_form_details_report(-511, (date2() - '1 day'::interval)::date, 
+                                  (date2() + '1 day'::interval)::date, 
+                                'Test account 1')
+    WHERE invoice_id = -1026;
+   
+INSERT INTO test_result(test_name, success)
+   SELECT 'future report, invoice -1036, acc 0',  acc_sum = 0
+    FROM tax_form_details_report(-511, (date2() - '1 day'::interval)::date, 
+                                  (date2() + '1 day'::interval)::date, 
+                                'Test account 1')
+    WHERE invoice_id = -1036;
+
+INSERT INTO test_result(test_name, success)
+   SELECT 'future report, invoice -1036, inv 500',  invoice_sum = 500
+    FROM tax_form_details_report(-511, (date2() - '1 day'::interval)::date, 
+                                  (date2() + '1 day'::interval)::date, 
+                                'Test account 1')
+    WHERE invoice_id = -1036;
+
+   
+INSERT INTO test_result(test_name, success)
+   SELECT 'future report, invoice -1036, total 500',  total_sum = 500
+    FROM tax_form_details_report(-511, (date2() - '1 day'::interval)::date, 
+                                  (date2() + '1 day'::interval)::date, 
+                                'Test account 1')
+    WHERE invoice_id = -1036;
+
 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	2011-06-30 10:18:09 UTC (rev 3386)
+++ trunk/t/43-dbtest.t	2011-06-30 10:32:28 UTC (rev 3387)
@@ -5,7 +5,7 @@
 	plan skip_all => 'Skipping all.  Told not to test db.';
 }
 else {
-	plan tests => 127;
+	plan tests => 145;
 	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.