]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/perlmods/lib/OpenILS/Utils/TestUtils.pm
443857c89dba6546707c76b7da6b2246cbbc63be
[Evergreen.git] / Open-ILS / src / perlmods / lib / OpenILS / Utils / TestUtils.pm
1 package OpenILS::Utils::TestUtils;
2 use base "OpenILS::Utils::Cronscript";
3
4 # The purpose of this module is to consolidate common routines that may
5 # be used by the integration tests in src/perlmods/live_t/
6
7 use strict; use warnings;
8
9 my $apputils = 'OpenILS::Application::AppUtils';
10
11 sub register_workstation {
12     my ($self,$name,$lib) = (shift,shift,shift);
13     my $resp = $apputils->simplereq(
14         'open-ils.actor',
15         'open-ils.actor.workstation.register',
16         $self->authtoken, $name, $lib);
17     return $resp;
18 }
19
20 sub do_checkout {
21     my ($self,$args) = (shift,shift);
22     my $resp = $apputils->simplereq(
23         'open-ils.circ',
24         'open-ils.circ.checkout.full', $self->authtoken, $args);
25     return $resp;
26 }
27
28 sub do_checkin {
29     my ($self,$args) = (shift,shift);
30     my $resp = $apputils->simplereq(
31         'open-ils.circ',
32         'open-ils.circ.checkin', $self->authtoken, $args );
33     return $resp;
34 }
35
36 sub do_checkin_override {
37     my ($self,$args) = (shift,shift);
38     my $resp = $apputils->simplereq(
39         'open-ils.circ',
40         'open-ils.circ.checkin.override', $self->authtoken, $args );
41     return $resp;
42 }
43
44 1;