|
Lines 60-66
subtest 'AuthenticatePatron test' => sub {
Link Here
|
| 60 |
} |
60 |
} |
| 61 |
}); |
61 |
}); |
| 62 |
|
62 |
|
| 63 |
my $query = new CGI; |
63 |
my $query = CGI->new; |
| 64 |
$query->param( 'username', $borrower->{userid}); |
64 |
$query->param( 'username', $borrower->{userid}); |
| 65 |
$query->param( 'password', $plain_password); |
65 |
$query->param( 'password', $plain_password); |
| 66 |
|
66 |
|
|
Lines 207-213
subtest 'GetPatronInfo/GetBorrowerAttributes test for extended patron attributes
Link Here
|
| 207 |
); |
207 |
); |
| 208 |
|
208 |
|
| 209 |
# Prepare and send web request for IL-SDI server: |
209 |
# Prepare and send web request for IL-SDI server: |
| 210 |
my $query = new CGI; |
210 |
my $query = CGI->new; |
| 211 |
$query->param( 'service', 'GetPatronInfo' ); |
211 |
$query->param( 'service', 'GetPatronInfo' ); |
| 212 |
$query->param( 'patron_id', $brwr->{'borrowernumber'} ); |
212 |
$query->param( 'patron_id', $brwr->{'borrowernumber'} ); |
| 213 |
$query->param( 'show_attributes', '1' ); |
213 |
$query->param( 'show_attributes', '1' ); |
|
Lines 329-335
subtest 'Holds test' => sub {
Link Here
|
| 329 |
} |
329 |
} |
| 330 |
}); |
330 |
}); |
| 331 |
|
331 |
|
| 332 |
my $query = new CGI; |
332 |
my $query = CGI->new; |
| 333 |
$query->param( 'patron_id', $patron->{borrowernumber}); |
333 |
$query->param( 'patron_id', $patron->{borrowernumber}); |
| 334 |
$query->param( 'bib_id', $biblio->{biblionumber}); |
334 |
$query->param( 'bib_id', $biblio->{biblionumber}); |
| 335 |
|
335 |
|
|
Lines 355-361
subtest 'Holds test' => sub {
Link Here
|
| 355 |
source => 'Biblio', |
355 |
source => 'Biblio', |
| 356 |
}); |
356 |
}); |
| 357 |
|
357 |
|
| 358 |
$query = new CGI; |
358 |
$query = CGI->new; |
| 359 |
$query->param( 'patron_id', $patron->{borrowernumber}); |
359 |
$query->param( 'patron_id', $patron->{borrowernumber}); |
| 360 |
$query->param( 'bib_id', $biblio_with_no_item->{biblionumber}); |
360 |
$query->param( 'bib_id', $biblio_with_no_item->{biblionumber}); |
| 361 |
|
361 |
|
|
Lines 393-399
subtest 'Holds test' => sub {
Link Here
|
| 393 |
} |
393 |
} |
| 394 |
); |
394 |
); |
| 395 |
|
395 |
|
| 396 |
$query = new CGI; |
396 |
$query = CGI->new; |
| 397 |
$query->param( 'patron_id', $patron->{borrowernumber}); |
397 |
$query->param( 'patron_id', $patron->{borrowernumber}); |
| 398 |
$query->param( 'bib_id', $biblio2->{biblionumber}); |
398 |
$query->param( 'bib_id', $biblio2->{biblionumber}); |
| 399 |
$query->param( 'item_id', $item2->{itemnumber}); |
399 |
$query->param( 'item_id', $item2->{itemnumber}); |
|
Lines 441-447
subtest 'Holds test' => sub {
Link Here
|
| 441 |
} |
441 |
} |
| 442 |
); |
442 |
); |
| 443 |
|
443 |
|
| 444 |
$query = new CGI; |
444 |
$query = CGI->new; |
| 445 |
$query->param( 'patron_id', $patron->{borrowernumber}); |
445 |
$query->param( 'patron_id', $patron->{borrowernumber}); |
| 446 |
$query->param( 'bib_id', $biblio3->{biblionumber}); |
446 |
$query->param( 'bib_id', $biblio3->{biblionumber}); |
| 447 |
$query->param( 'item_id', $item4->{itemnumber}); |
447 |
$query->param( 'item_id', $item4->{itemnumber}); |
|
Lines 520-526
subtest 'Holds test for branch transfer limits' => sub {
Link Here
|
| 520 |
itemtype => $item->{itype}, |
520 |
itemtype => $item->{itype}, |
| 521 |
})->store(); |
521 |
})->store(); |
| 522 |
|
522 |
|
| 523 |
my $query = new CGI; |
523 |
my $query = CGI->new; |
| 524 |
$query->param( 'pickup_location', $pickup_branch->{branchcode} ); |
524 |
$query->param( 'pickup_location', $pickup_branch->{branchcode} ); |
| 525 |
$query->param( 'patron_id', $patron->{borrowernumber}); |
525 |
$query->param( 'patron_id', $patron->{borrowernumber}); |
| 526 |
$query->param( 'bib_id', $biblio->{biblionumber}); |
526 |
$query->param( 'bib_id', $biblio->{biblionumber}); |
|
Lines 580-586
subtest 'Holds test with start_date and end_date' => sub {
Link Here
|
| 580 |
} |
580 |
} |
| 581 |
); |
581 |
); |
| 582 |
|
582 |
|
| 583 |
my $query = new CGI; |
583 |
my $query = CGI->new; |
| 584 |
$query->param( 'pickup_location', $pickup_library->branchcode ); |
584 |
$query->param( 'pickup_location', $pickup_library->branchcode ); |
| 585 |
$query->param( 'patron_id', $patron->borrowernumber); |
585 |
$query->param( 'patron_id', $patron->borrowernumber); |
| 586 |
$query->param( 'bib_id', $item->biblionumber); |
586 |
$query->param( 'bib_id', $item->biblionumber); |
|
Lines 643-649
subtest 'GetRecords' => sub {
Link Here
|
| 643 |
|
643 |
|
| 644 |
ModItemTransfer($item->itemnumber, $branch1->{branchcode}, $branch2->{branchcode}); |
644 |
ModItemTransfer($item->itemnumber, $branch1->{branchcode}, $branch2->{branchcode}); |
| 645 |
|
645 |
|
| 646 |
my $cgi = new CGI; |
646 |
my $cgi = CGI->new; |
| 647 |
$cgi->param(service => 'GetRecords'); |
647 |
$cgi->param(service => 'GetRecords'); |
| 648 |
$cgi->param(id => $biblio->{biblionumber}); |
648 |
$cgi->param(id => $biblio->{biblionumber}); |
| 649 |
|
649 |
|
|
Lines 666-672
subtest 'RenewHold' => sub {
Link Here
|
| 666 |
|
666 |
|
| 667 |
$schema->storage->txn_begin; |
667 |
$schema->storage->txn_begin; |
| 668 |
|
668 |
|
| 669 |
my $cgi = new CGI; |
669 |
my $cgi = CGI->new; |
| 670 |
my $patron = $builder->build_object( { class => 'Koha::Patrons' } ); |
670 |
my $patron = $builder->build_object( { class => 'Koha::Patrons' } ); |
| 671 |
my $item = $builder->build_object( { class => 'Koha::Items' } ); |
671 |
my $item = $builder->build_object( { class => 'Koha::Items' } ); |
| 672 |
$cgi->param( patron_id => $patron->borrowernumber ); |
672 |
$cgi->param( patron_id => $patron->borrowernumber ); |
|
Lines 714-720
subtest 'GetPatronInfo paginated loans' => sub {
Link Here
|
| 714 |
branchcode => $library->branchcode, |
714 |
branchcode => $library->branchcode, |
| 715 |
}, |
715 |
}, |
| 716 |
}); |
716 |
}); |
| 717 |
my $module = new Test::MockModule('C4::Context'); |
717 |
my $module = Test::MockModule->new('C4::Context'); |
| 718 |
$module->mock('userenv', sub { { branch => $library->branchcode } }); |
718 |
$module->mock('userenv', sub { { branch => $library->branchcode } }); |
| 719 |
my $date_due = DateTime->now->add(weeks => 2); |
719 |
my $date_due = DateTime->now->add(weeks => 2); |
| 720 |
my $issue1 = C4::Circulation::AddIssue($patron->unblessed, $item1->barcode, $date_due); |
720 |
my $issue1 = C4::Circulation::AddIssue($patron->unblessed, $item1->barcode, $date_due); |
|
Lines 724-730
subtest 'GetPatronInfo paginated loans' => sub {
Link Here
|
| 724 |
my $issue3 = C4::Circulation::AddIssue($patron->unblessed, $item3->barcode, $date_due); |
724 |
my $issue3 = C4::Circulation::AddIssue($patron->unblessed, $item3->barcode, $date_due); |
| 725 |
my $date_due3 = Koha::DateUtils::dt_from_string( $issue3->date_due ); |
725 |
my $date_due3 = Koha::DateUtils::dt_from_string( $issue3->date_due ); |
| 726 |
|
726 |
|
| 727 |
my $cgi = new CGI; |
727 |
my $cgi = CGI->new; |
| 728 |
|
728 |
|
| 729 |
$cgi->param( 'service', 'GetPatronInfo' ); |
729 |
$cgi->param( 'service', 'GetPatronInfo' ); |
| 730 |
$cgi->param( 'patron_id', $patron->borrowernumber ); |
730 |
$cgi->param( 'patron_id', $patron->borrowernumber ); |