summaryrefslogtreecommitdiff
path: root/sql/modules/test/Company.sql
blob: fa95b32a7b274c099fc1d86769287898a8e534b1 (plain)
  1. BEGIN;
  2. \i Base.sql
  3. INSERT INTO test_result (test_name, success)
  4. SELECT 'Saving Company',
  5. company_save (NULL, 'TESTING...', 1,'TESTING', 'TESTING', NULL, '1234')
  6. IS NOT NULL;
  7. INSERT INTO test_result (test_name, success)
  8. SELECT 'Saving Credit Acct',
  9. entity_credit_save( NULL , 1, currval('entity_id_seq')::int, 'TEST', 0, false,
  10. 0, 0, 0, 'test-123', NULL, NULL, NULL, 'USD', now()::date, now()::date,
  11. 0, NULL, NULL)
  12. IS NOT NULL;
  13. INSERT INTO test_result (test_name, success)
  14. SELECT 'eca_location_save',
  15. eca__location_save(currval('entity_credit_account_id_seq')::int, NULL, 2, 'Test', 'Test',
  16. NULL, 'Test', 'Test', '12345', 25)
  17. IS NOT NULL;
  18. INSERT INTO test_result (test_name, success)
  19. SELECT 'list_locations', count(*) > 0
  20. FROM eca__list_locations(currval('entity_credit_account_id_seq')::int);
  21. SELECT * FROM test_result;
  22. SELECT (select count(*) from test_result where success is true)
  23. || ' tests passed and '
  24. || (select count(*) from test_result where success is not true)
  25. || ' failed' as message;
  26. ROLLBACK;