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

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



Revision: 2685
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2685&view=rev
Author:   aurynn_cmd
Date:     2009-06-15 21:02:15 +0000 (Mon, 15 Jun 2009)

Log Message:
-----------
Adding the notes sproc tests to Company.sql.

Modified Paths:
--------------
    trunk/sql/modules/test/Company.sql
    trunk/t/data/62-request-data

Modified: trunk/sql/modules/test/Company.sql
===================================================================
--- trunk/sql/modules/test/Company.sql	2009-06-15 18:51:53 UTC (rev 2684)
+++ trunk/sql/modules/test/Company.sql	2009-06-15 21:02:15 UTC (rev 2685)
@@ -46,7 +46,31 @@
 FROM company_get_billing_info((select max(id) from entity_credit_account))
 WHERE control_code is not null;
 
+-- Note tests --
 
+INSERT INTO test_result (test_name, success)
+SELECT 'entity__save_notes',
+       entity__save_notes ( currval('entity_id_seq'), 'Test note text', 'Test note subject' );
+       
+INSERT INTO test_result (test_name, success)
+SELECT 'entity__save_note subject record',
+       CASE WHEN subject = 'Test note subject' THEN 't'::bool ELSE 'f'::bool END
+       FROM entity_note
+       group by subject, id
+       having id = max(id);
+       
+INSERT INTO test_result(test_name, success)
+SELECT 'eca_save_notes',
+       eca__save_notes( currval('entity_credit_account_id_seq', 'Test note text', 'ECA test note subject') );
+
+INSERT INTO test_result (test_name, success)
+SELECT 'eca__save_notes subject record',
+       CASE WHEN subject = 'ECA test note subject' THEN 't'::bool ELSE 'f'::bool END
+       FROM eca_note
+       group by subject, id
+       HAVING id = max(id);
+
+
 SELECT * FROM test_result;
 
 

Modified: trunk/t/data/62-request-data
===================================================================
--- trunk/t/data/62-request-data	2009-06-15 18:51:53 UTC (rev 2684)
+++ trunk/t/data/62-request-data	2009-06-15 21:02:15 UTC (rev 2685)
@@ -220,8 +220,7 @@
 		'account_class' => 1,
 		'currency'      => 'USD',
 		'multiple'      => 1,
-	},
-	
+	},	
 ];
 
 our $pre_test_subs = {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.