Lines 46-55
subtest 'request() tests' => sub {
Link Here
|
46 |
|
46 |
|
47 |
my $ar_module = mock_article_request_module(); |
47 |
my $ar_module = mock_article_request_module(); |
48 |
|
48 |
|
49 |
my $ar = Koha::ArticleRequest->new( |
49 |
my $ar = $builder->build_object( |
50 |
{ |
50 |
{ |
51 |
borrowernumber => $patron->id, |
51 |
class => 'Koha::ArticleRequests', |
52 |
biblionumber => $item->biblionumber, |
52 |
value => { |
|
|
53 |
borrowernumber => $patron->id, |
54 |
biblionumber => $item->biblionumber, |
55 |
debit_id => undef, |
56 |
} |
53 |
} |
57 |
} |
54 |
); |
58 |
); |
55 |
|
59 |
|
Lines 67-77
subtest 'request() tests' => sub {
Link Here
|
67 |
# set a fee amount |
71 |
# set a fee amount |
68 |
$amount = 10; |
72 |
$amount = 10; |
69 |
|
73 |
|
70 |
$ar = Koha::ArticleRequest->new( |
74 |
$ar = $builder->build_object( |
71 |
{ |
75 |
{ |
72 |
borrowernumber => $patron->id, |
76 |
class => 'Koha::ArticleRequests', |
73 |
biblionumber => $item->biblionumber, |
77 |
value => { |
74 |
itemnumber => $item->id, |
78 |
borrowernumber => $patron->id, |
|
|
79 |
biblionumber => $item->biblionumber, |
80 |
itemnumber => $item->id, |
81 |
} |
75 |
} |
82 |
} |
76 |
); |
83 |
); |
77 |
|
84 |
|
Lines 101-110
subtest 'set_pending() tests' => sub {
Link Here
|
101 |
|
108 |
|
102 |
my $ar_module = mock_article_request_module(); |
109 |
my $ar_module = mock_article_request_module(); |
103 |
|
110 |
|
104 |
my $ar = Koha::ArticleRequest->new( |
111 |
my $ar = $builder->build_object( |
105 |
{ |
112 |
{ |
106 |
borrowernumber => $patron->id, |
113 |
class => 'Koha::ArticleRequests', |
107 |
biblionumber => $biblio->id, |
114 |
value => { |
|
|
115 |
borrowernumber => $patron->id, |
116 |
biblionumber => $biblio->id, |
117 |
} |
108 |
} |
118 |
} |
109 |
); |
119 |
); |
110 |
|
120 |
|
Lines 176-186
subtest 'cancel() tests' => sub {
Link Here
|
176 |
|
186 |
|
177 |
my $ar_module = mock_article_request_module(); |
187 |
my $ar_module = mock_article_request_module(); |
178 |
|
188 |
|
179 |
my $ar = Koha::ArticleRequest->new( |
189 |
my $ar = $builder->build_object( |
180 |
{ |
190 |
{ |
181 |
borrowernumber => $patron->id, |
191 |
class => 'Koha::ArticleRequests', |
182 |
biblionumber => $item->biblionumber, |
192 |
value => { |
183 |
itemnumber => $item->id, |
193 |
borrowernumber => $patron->id, |
|
|
194 |
biblionumber => $item->biblionumber, |
195 |
itemnumber => $item->id, |
196 |
} |
184 |
} |
197 |
} |
185 |
); |
198 |
); |
186 |
|
199 |
|