summaryrefslogtreecommitdiff
path: root/sql/modules/test
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-11-07 21:17:08 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-11-07 21:17:08 +0000
commite9be327c853a73b7dbc517b9a63eff85444a3d7f (patch)
treefaa0e0dc8c8f6aa5c41ea6f24209dbc78809ede7 /sql/modules/test
parentd877887c0268c23acad9785f2307a6f19f9c2b93 (diff)
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
Diffstat (limited to 'sql/modules/test')
-rw-r--r--sql/modules/test/Company.sql18
1 files changed, 17 insertions, 1 deletions
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;