]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/perlmods/live_t/10-lp1484989_dont_close_fined_xacts.t
LP#1484989 Don't close xacts with checkin-generated fines
[working/Evergreen.git] / Open-ILS / src / perlmods / live_t / 10-lp1484989_dont_close_fined_xacts.t
1 #!perl
2
3 use Test::More tests => 2;
4
5 diag("Make sure we don't close xacts with fines");
6
7 use strict;
8 use warnings;
9
10 use OpenILS::Utils::TestUtils;
11 my $script = OpenILS::Utils::TestUtils->new();
12 #our $apputils   = "OpenILS::Application::AppUtils";
13 my $storage_ses = $script->session('open-ils.storage');
14 $script->authenticate({
15     username => 'admin',
16     password => 'demo123',
17     type => 'staff'});
18 ok( $script->authtoken, 'Have an authtoken');
19
20 my $barcode = 'CONC4000054';
21 my $circ_id = 18;
22
23 my $checkin_resp = $script->do_checkin_override({
24     barcode => $barcode});
25
26 my $circ_req = $storage_ses->request('open-ils.storage.direct.action.circulation.retrieve', $circ_id);
27 if (my $circ_resp = $circ_req->recv) {
28     if (my $circ = $circ_resp->content) {
29         ok(
30             !$circ->xact_finish,
31             'Circ with id = ' . $circ_id . ' is overdue with fines, so xact_finish isn\'t set'
32         );
33     }
34 }
35
36 $script->logout();