3 -- Turn off echo and keep things quiet.
5 -- Format the output for nice TAP.
10 -- Revert all changes on failure.
11 \set ON_ERROR_ROLLBACK 1
12 \set ON_ERROR_STOP true
15 -- Load the TAP functions.
24 'Checkout test Available succeeds'
25 ) FROM action.item_user_circ_test(4, 1, 1);
27 -- is_available defaults to false
28 INSERT into config.copy_status (id, name) VALUES (101, 'lp1464709');
29 UPDATE asset.copy SET status = 101 WHERE id = 1;
34 'Checkout test is_available=false fails'
35 ) FROM action.item_user_circ_test(4, 1, 1);
37 UPDATE config.copy_status SET is_available = TRUE WHERE name = 'lp1464709';
42 'Checkout test is_available=true succeeds'
43 ) FROM action.item_user_circ_test(4, 1, 1);
46 -- Finish the tests and clean up.
47 SELECT * FROM finish();