From e9be327c853a73b7dbc517b9a63eff85444a3d7f Mon Sep 17 00:00:00 2001 From: einhverfr Date: Fri, 7 Nov 2008 21:17:08 +0000 Subject: Adding edit_drafts permission Correcting logic in location_save Correcting data type contact_list Correcting some logic regarding how addresses are stored when they are modified. Adding relevant test cases. git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2382 4979c152-3d1c-0410-bac9-87ea11338e46 --- sql/modules/test/Company.sql | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'sql/modules/test') diff --git a/sql/modules/test/Company.sql b/sql/modules/test/Company.sql index fa95b32a..7634b7ea 100644 --- a/sql/modules/test/Company.sql +++ b/sql/modules/test/Company.sql @@ -21,9 +21,25 @@ SELECT 'eca_location_save', IS NOT NULL; INSERT INTO test_result (test_name, success) -SELECT 'list_locations', count(*) > 0 +SELECT 'eca_location_save returns same id with same args and no in_location_id', + eca__location_save(currval('entity_credit_account_id_seq')::int, NULL, 1, 'Test2', 'Test', + '', 'Test', 'Test', '12345', 25) = + eca__location_save(currval('entity_credit_account_id_seq')::int, NULL, 2, 'Test2', 'Test', + '', 'Test', 'Test', '12345', 25); + +INSERT INTO test_result (test_name, success) +SELECT 'list_locations', count(*) = 3 FROM eca__list_locations(currval('entity_credit_account_id_seq')::int); +INSERT INTO test_result(test_name, success) +SELECT 'saving eca contact', + eca__save_contact(currval('entity_credit_account_id_seq')::int, + 1, 'test_d', 'test_c', NULL, NULL) IS NOT NULL; + +INSERT INTO test_result(test_name, success) +SELECT 'Contact found correctly', count(*) = 1 +FROM eca__list_contacts(currval('entity_credit_account_id_seq')::int) +WHERE contact = 'test_c'; SELECT * FROM test_result; -- cgit v1.2.3