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

SF.net SVN: ledger-smb:[4870] branches/1.3/sql/modules/test



Revision: 4870
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=4870&view=rev
Author:   einhverfr
Date:     2012-06-08 07:46:16 +0000 (Fri, 08 Jun 2012)
Log Message:
-----------
Fixes to test cases for in-db tests

Modified Paths:
--------------
    branches/1.3/sql/modules/test/Company.sql
    branches/1.3/sql/modules/test/Payment.sql
    branches/1.3/sql/modules/test/Session.sql

Modified: branches/1.3/sql/modules/test/Company.sql
===================================================================
--- branches/1.3/sql/modules/test/Company.sql	2012-06-08 07:33:02 UTC (rev 4869)
+++ branches/1.3/sql/modules/test/Company.sql	2012-06-08 07:46:16 UTC (rev 4870)
@@ -11,7 +11,7 @@
 SELECT 'Saving Credit Acct', 
 	entity_credit_save(  NULL , 1, currval('entity_id_seq')::int, 'TEST', 0, false,
 		0, 0, 0, 'test-123', NULL, NULL, NULL, 'USD', now()::date, now()::date,
-		0, -1000, NULL, NULL, NULL)
+		0, -1000, NULL, NULL, NULL, NULL)
 	IS NOT NULL;
 
 INSERT INTO test_result (test_name, success)

Modified: branches/1.3/sql/modules/test/Payment.sql
===================================================================
--- branches/1.3/sql/modules/test/Payment.sql	2012-06-08 07:33:02 UTC (rev 4869)
+++ branches/1.3/sql/modules/test/Payment.sql	2012-06-08 07:46:16 UTC (rev 4870)
@@ -5,8 +5,8 @@
 insert into users (entity_id, username, id)
 values (-200, '_test1', -200);
 
-insert into session (session_id, users_id, token, last_used, transaction_id)
-values (-200, -200, md5(random()::text), now(), 0);
+insert into session (session_id, users_id, token, last_used)
+values (-200, -200, md5(random()::text), now());
 
 INSERT INTO chart (accno, description, charttype, category, link)
 VALUES ('00001', 'testing', 'A', 'L', 'AP');
@@ -15,8 +15,8 @@
 INSERT INTO chart (accno, description, charttype, category, link)
 VALUES ('00003', 'testing2', 'A', 'A', 'AP_paid');
 
-INSERT INTO session (users_id, last_used, token, transaction_id)
-values (currval('users_id_seq'),  now(), md5('test2'), 2);
+INSERT INTO session (users_id, last_used, token)
+values (currval('users_id_seq'),  now(), md5('test2'));
 
 INSERT INTO test_result(test_name, success)
 SELECT 'AP Batch created', (SELECT batch_create('test', 'test', 'ap', now()::date)) IS NOT NULL;
@@ -126,7 +126,7 @@
 
 INSERT INTO test_result(test_name, success)
 SELECT 'batch_description exists', count(batch_description) = 1 
-FROM payment__search('_test_src1', NULL, NULL, -101, '00003', 1);
+FROM payment__search('_test_src1', NULL, NULL, -101, '00003', 1, 'USD');
 
 SELECT * FROM TEST_RESULT;
 

Modified: branches/1.3/sql/modules/test/Session.sql
===================================================================
--- branches/1.3/sql/modules/test/Session.sql	2012-06-08 07:33:02 UTC (rev 4869)
+++ branches/1.3/sql/modules/test/Session.sql	2012-06-08 07:46:16 UTC (rev 4870)
@@ -6,21 +6,21 @@
 values ('timeout set', 
 (select count(*) from defaults where setting_key = 'timeout') = 1);
 
-INSERT INTO session (users_id, last_used, token, transaction_id)
+INSERT INTO session (users_id, last_used, token)
 SELECT 	currval('users_id_seq'), 
 now() - coalesce((select value from defaults where setting_key = 'timeout')::interval, 
          '90 minutes'::interval) - '1 minute'::interval, 
-md5('test2'), 2;
+md5('test2');
 
 
-INSERT INTO session (users_id, last_used, token, transaction_id)
+INSERT INTO session (users_id, last_used, token)
 SELECT currval('users_id_seq'), 
 now() - coalesce((select value from defaults where setting_key = 'timeout')::interval, 
          '2 days'::interval), 
-md5('test3'), 3;
+md5('test3');
 
-INSERT INTO session (users_id, last_used, token, transaction_id)
-SELECT currval('users_id_seq'), now(), md5('test1'), 1;
+INSERT INTO session (users_id, last_used, token)
+SELECT currval('users_id_seq'), now(), md5('test1');
 
 INSERT INTO test_result (test_name, success)
 SELECT 'records exist in transactions table', count(*) > 0 FROM transactions;

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