LP#980296: pgtap tests for the void on claims returned org settings.
authorJason Stephenson <jason@sigio.com>
Sun, 7 Dec 2014 18:55:53 +0000 (13:55 -0500)
committerBen Shum <bshum@biblio.org>
Tue, 13 Jan 2015 21:58:53 +0000 (16:58 -0500)
A single pgtap file to check if the 4 new settings exist in the database.

Signed-off-by: Jason Stephenson <jason@sigio.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/sql/Pg/t/lp980296-void-lost-lo-claims-returned.pg [new file with mode: 0644]

diff --git a/Open-ILS/src/sql/Pg/t/lp980296-void-lost-lo-claims-returned.pg b/Open-ILS/src/sql/Pg/t/lp980296-void-lost-lo-claims-returned.pg
new file mode 100644 (file)
index 0000000..33695f1
--- /dev/null
@@ -0,0 +1,45 @@
+\set ECHO
+\set QUIET 1
+-- Turn off echo and keep things quiet.
+
+-- Format the output for nice TAP.
+\pset format unaligned
+\pset tuples_only true
+\pset pager
+
+-- Revert all changes on failure.
+\set ON_ERROR_ROLLBACK 1
+\set ON_ERROR_STOP true
+\set QUIET 1
+
+-- Load the TAP functions.
+BEGIN;
+
+-- Plan the tests.
+SELECT plan(4);
+
+-- Run the tests.
+
+SELECT isnt_empty(
+    'SELECT * FROM config.org_unit_setting_type WHERE name = $$circ.void_lost_on_claimsreturned$$',
+    'circ.void_lost_on_claimsreturned exists'
+);
+
+SELECT isnt_empty(
+    'SELECT * FROM config.org_unit_setting_type WHERE name = $$circ.void_lost_proc_fee_on_claimsreturned$$',
+    'circ.void_lost_proc_fee_on_claimsreturned exists'
+);
+
+SELECT isnt_empty(
+    'SELECT * FROM config.org_unit_setting_type WHERE name = $$circ.void_longoverdue_on_claimsreturned$$',
+    'circ.void_longoverdue_on_claimsreturned exists'
+);
+
+SELECT isnt_empty(
+    'SELECT * FROM config.org_unit_setting_type WHERE name = $$circ.void_longoverdue_proc_fee_on_claimsreturned$$',
+    'circ.void_longoverdue_proc_fee_on_claimsreturned exists'
+);
+
+-- Finish the tests and clean up.
+SELECT * FROM finish();
+ROLLBACK;