]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/sql/Pg/t/lp1198475-lost-and-paid-status.pg
LP1615805 No inputs after submit in patron search (AngularJS)
[working/Evergreen.git] / Open-ILS / src / sql / Pg / t / lp1198475-lost-and-paid-status.pg
1 \set ECHO none
2 \set QUIET 1
3 -- Turn off echo and keep things quiet.
4
5 -- Format the output for nice TAP.
6 \pset format unaligned
7 \pset tuples_only true
8 \pset pager
9
10 -- Revert all changes on failure.
11 \set ON_ERROR_ROLLBACK 1
12 \set ON_ERROR_STOP true
13 \set QUIET 1
14
15 -- Load the TAP functions.
16 BEGIN;
17
18 -- Plan the tests.
19 SELECT plan(2);
20
21 -- Run the tests.
22 -- Check for Lost and Paid copy status.
23 SELECT isnt_empty(
24     'SELECT * FROM config.copy_status WHERE id = 17',
25     'Lost and Paid copy status exists'
26 );
27
28 --Check for the org_unit setting.
29 SELECT isnt_empty(
30     'SELECT * FROM config.org_unit_setting_type WHERE name = $$circ.use_lost_paid_copy_status$$',
31     'circ.use_lost_paid_copy_status exists'
32 );
33
34 -- Finish the tests and clean up.
35 SELECT * FROM finish();
36 ROLLBACK;