1 -- Load the TAP functions.
9 PREPARE insert_transit AS
10 INSERT INTO action.transit_copy
11 (target_copy, source, dest, copy_status) VALUES (4003, 4, 7, 0);
13 PREPARE insert_hold_transit AS
14 INSERT INTO action.hold_transit_copy
15 (target_copy, source, dest, copy_status) VALUES (4003, 4, 7, 8);
17 PREPARE insert_reservation_transit AS
18 INSERT INTO action.reservation_transit_copy
19 (target_copy, source, dest, copy_status) VALUES (4003, 4, 7, 8);
21 SELECT lives_ok('insert_transit', 'First transit inserts OK');
24 (SELECT COUNT(*) FROM action.transit_copy WHERE target_copy = 4003)::INT,
25 1, 'Confirm a single transit exists');
27 SELECT throws_ok('insert_transit');
29 SELECT throws_ok('insert_hold_transit');
31 SELECT throws_ok('insert_reservation_transit');
34 (SELECT COUNT(*) FROM action.transit_copy WHERE target_copy = 4003)::INT,
35 1, 'Confirm a single transit exists');
37 -- Finish the tests and clean up.
38 SELECT * FROM finish();