]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/sql/Pg/t/lp1513554_do_not_delete_reserved_cancel_reasons.pg
LP1615805 No inputs after submit in patron search (AngularJS)
[working/Evergreen.git] / Open-ILS / src / sql / Pg / t / lp1513554_do_not_delete_reserved_cancel_reasons.pg
1 BEGIN;
2
3 SELECT plan(3);
4
5 SELECT throws_ok(
6     'delete from acq.cancel_reason where id = 1', 
7     'P0001', 
8     'Cannot delete row with reserved ID 1'
9 );
10
11 SELECT lives_ok(
12     'insert into acq.cancel_reason (id, org_unit, label, description) values (3001, 1, ''Test Reason'', ''Test Cancel Reason'')',
13     'Creating test cancel reason'
14 );
15
16 SELECT lives_ok(
17     'delete from acq.cancel_reason where id = 3001',
18     'Testing delete of non-reserved cancel reason'
19 );
20
21 SELECT * FROM finish();
22
23 ROLLBACK;