From: Jason Stephenson Date: Sun, 7 Dec 2014 18:55:53 +0000 (-0500) Subject: LP#980296: pgtap tests for the void on claims returned org settings. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a98eac1206a2a6713ad7e4cefb234311e9e91d41;p=evergreen%2Fmasslnc.git LP#980296: pgtap tests for the void on claims returned org settings. A single pgtap file to check if the 4 new settings exist in the database. Signed-off-by: Jason Stephenson Signed-off-by: Kathy Lussier Signed-off-by: Ben Shum --- 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 index 0000000000..33695f1712 --- /dev/null +++ b/Open-ILS/src/sql/Pg/t/lp980296-void-lost-lo-claims-returned.pg @@ -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;