|
Lines 71-77
subtest 'Testing Patron Info Request V2' => sub {
Link Here
|
| 71 |
subtest 'Checkout V2' => sub { |
71 |
subtest 'Checkout V2' => sub { |
| 72 |
my $schema = Koha::Database->new->schema; |
72 |
my $schema = Koha::Database->new->schema; |
| 73 |
$schema->storage->txn_begin; |
73 |
$schema->storage->txn_begin; |
| 74 |
plan tests => 3; |
74 |
plan tests => 5; |
| 75 |
$C4::SIP::Sip::protocol_version = 2; |
75 |
$C4::SIP::Sip::protocol_version = 2; |
| 76 |
test_checkout_v2(); |
76 |
test_checkout_v2(); |
| 77 |
$schema->storage->txn_rollback; |
77 |
$schema->storage->txn_rollback; |
|
Lines 614-619
sub test_checkout_v2 {
Link Here
|
| 614 |
$msg->handle_checkout( $server ); |
614 |
$msg->handle_checkout( $server ); |
| 615 |
$respcode = substr( $response, 0, 2 ); |
615 |
$respcode = substr( $response, 0, 2 ); |
| 616 |
is( Koha::Checkouts->search({ itemnumber => $item_object->id })->count, 1, "Item was checked out (prevcheckout_block_checkout disabled)"); |
616 |
is( Koha::Checkouts->search({ itemnumber => $item_object->id })->count, 1, "Item was checked out (prevcheckout_block_checkout disabled)"); |
|
|
617 |
|
| 618 |
$msg->handle_checkout( $server ); |
| 619 |
ok( $response =~ m/AH\d{8} \d{6}/, "Found AH field as timestamp in response"); |
| 620 |
$server->{account}->{format_due_date} = 1; |
| 621 |
t::lib::Mocks::mock_preference( 'dateFormat', 'sql' ); |
| 622 |
undef $response; |
| 623 |
$msg->handle_checkout( $server ); |
| 624 |
ok( $response =~ m/AH\d{4}-\d{2}-\d{2}/, "Found AH field as SQL date in response"); |
| 625 |
|
| 617 |
} |
626 |
} |
| 618 |
|
627 |
|
| 619 |
sub test_checkin_v2 { |
628 |
sub test_checkin_v2 { |
| 620 |
- |
|
|