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

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



Revision: 2877
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2877&view=rev
Author:   einhverfr
Date:     2010-02-09 19:41:45 +0000 (Tue, 09 Feb 2010)

Log Message:
-----------
db tests for form open/close routines

Modified Paths:
--------------
    trunk/sql/modules/test/Session.sql
    trunk/t/43-dbtest.t

Modified: trunk/sql/modules/test/Session.sql
===================================================================
--- trunk/sql/modules/test/Session.sql	2010-02-09 19:25:06 UTC (rev 2876)
+++ trunk/sql/modules/test/Session.sql	2010-02-09 19:41:45 UTC (rev 2877)
@@ -61,6 +61,15 @@
 );
 
 INSERT INTO test_result (test_name, success)
+select 'Form_open on correct syntax', form_open(currval('session_session_id_seq')::int) > 0;
+
+INSERT INTO test_result (test_name, success)
+select 'Form_close fails on bad values', form_close(currval('session_session_id_seq')::int + 1, currval('open_forms_id_seq')::int) is false;
+
+INSERT INTO test_result (test_name, success)
+select 'Form_close fails on bad values', form_close(currval('session_session_id_seq')::int, currval('open_forms_id_seq')::int);
+
+INSERT INTO test_result (test_name, success)
 VALUES ('session 2 removed', 
 (select count(*) from session where token = md5('test2') AND users_id = currval('users_id_seq')) = 0);
 

Modified: trunk/t/43-dbtest.t
===================================================================
--- trunk/t/43-dbtest.t	2010-02-09 19:25:06 UTC (rev 2876)
+++ trunk/t/43-dbtest.t	2010-02-09 19:41:45 UTC (rev 2877)
@@ -5,7 +5,7 @@
 	plan skip_all => 'Skipping all.  Told not to test db.';
 }
 else {
-	plan tests => 96;
+	plan tests => 99;
 	if (defined $ENV{LSMB_NEW_DB}){
 		$ENV{PGDATABASE} = $ENV{LSMB_NEW_DB};
 	}


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