diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2008-09-26 01:38:47 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2008-09-26 01:38:47 +0000 |
commit | be0fdf68acb96cd021608564fa3c7c40803fdee2 (patch) | |
tree | 73c4d574e0236d30964b964c57debfbfe6929195 /sql/modules/test | |
parent | a316a97097bf8bcf9a4f809faf30dd756e60563d (diff) |
Removing some hidden inputs from the payment details screen.
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2343 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'sql/modules/test')
-rw-r--r-- | sql/modules/test/Session.sql | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/sql/modules/test/Session.sql b/sql/modules/test/Session.sql index 97520bd1..bfcd37eb 100644 --- a/sql/modules/test/Session.sql +++ b/sql/modules/test/Session.sql @@ -29,6 +29,28 @@ select * from session_check(currval('session_session_id_seq')::int, md5('test1') INSERT INTO session (users_id, last_used, token, transaction_id) SELECT currval('users_id_seq'), now(), md5('test1'), 1; +INSERT INTO test_result (test_name, success) +SELECT 'records exist in transactions table', count(*) > 0 FROM transactions; + +INSERT INTO test_result (test_name, success) +SELECT 'unlock record fails when record is not locked', unlock(max(id)) IS FALSE +FROM transactions; + +INSERT INTO test_result (test_name, success) +SELECT 'lock record', lock_record(max(id), currval('session_session_id_seq')::int) + +FROM transactions WHERE locked_by IS NULL; + +INSERT INTO test_result (test_name, success) +SELECT 'unlock record', unlock(max(id)) +FROM transactions WHERE locked_by = currval('session_session_id_seq')::int; + +INSERT INTO test_result (test_name, success) +SELECT 'lock all record', bool_and(lock_record(id, currval('session_session_id_seq')::int)) +FROM transactions WHERE locked_by IS NULL; + +INSERT INTO test_result (test_name, success) +SELECT 'unlock all records', unlock_all(); INSERT INTO test_result (test_name, success) values ('session1 retrieved', @@ -43,9 +65,6 @@ 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); -DELETE FROM session WHERE users_id = currval('users_id_seq'); -DELETE FROM entity WHERE control_code = '_TESTING.....'; - SELECT * FROM test_result; SELECT (select count(*) from test_result where success is true) @@ -53,5 +72,4 @@ SELECT (select count(*) from test_result where success is true) || (select count(*) from test_result where success is not true) || ' failed' as message; -DROP TABLE test_result; ROLLBACK; |