[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[3017] trunk
- Subject: SF.net SVN: ledger-smb:[3017] trunk
- From: ..hidden..
- Date: Mon, 28 Jun 2010 18:18:15 +0000
Revision: 3017
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3017&view=rev
Author: einhverfr
Date: 2010-06-28 18:18:14 +0000 (Mon, 28 Jun 2010)
Log Message:
-----------
test cases for deletion problem
Modified Paths:
--------------
trunk/sql/modules/test/Voucher.sql
trunk/t/43-dbtest.t
Modified: trunk/sql/modules/test/Voucher.sql
===================================================================
--- trunk/sql/modules/test/Voucher.sql 2010-06-28 18:03:37 UTC (rev 3016)
+++ trunk/sql/modules/test/Voucher.sql 2010-06-28 18:18:14 UTC (rev 3017)
@@ -15,6 +15,8 @@
INSERT INTO account(id, accno, description, category, heading, contra)
values (-5, '-21111', 'Testing AP', 'A', (select id from account_heading WHERE accno = '000000000000000000000'), false);
+INSERT INTO country_tax_form(country_id, form_name, id) values (232, 'TEST', '-101');
+
INSERT INTO account_link(account_id, description) values (-5, 'AP');
INSERT INTO ap (id, invnumber, amount, curr, approved, entity_credit_account)
@@ -26,8 +28,14 @@
INSERT INTO ap (id, invnumber, amount, curr, approved, entity_credit_account)
VALUES (-6, 'test1', '1000', 'USD', false, -1);
-INSERT INTO acc_trans(trans_id, chart_id, amount, approved)
-values (-6, test_get_account_id('-21111'), 1000, true);
+INSERT INTO acc_trans(trans_id, chart_id, amount, approved, entry_id)
+values (-6, test_get_account_id('-21111'), 1000, true, -1);
+
+
+
+INSERT INTO ac_tax_form (entry_id, reportable)
+values (-1, false);
+
INSERT INTO voucher (trans_id, batch_id, batch_class)
values (-5, currval('batch_id_seq'), 1);
INSERT INTO voucher (trans_id, batch_id, batch_class)
@@ -57,6 +65,9 @@
'f'::bool -- Approved
);
+INSERT INTO test_result(test_name, success)
+SELECT 'Delete voucher with tax_form', voucher__delete(-6) = 1;
+
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 2010-06-28 18:03:37 UTC (rev 3016)
+++ trunk/t/43-dbtest.t 2010-06-28 18:18:14 UTC (rev 3017)
@@ -5,7 +5,7 @@
plan skip_all => 'Skipping all. Told not to test db.';
}
else {
- plan tests => 110;
+ plan tests => 111;
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.