Bug 34258: (QA follow-up) Tidy the test
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
5d0b4b4433
commit
328baf44b4
1 changed files with 10 additions and 8 deletions
|
@ -318,8 +318,8 @@ subtest renew_all => sub {
|
||||||
subtest renew => sub {
|
subtest renew => sub {
|
||||||
plan tests => 2;
|
plan tests => 2;
|
||||||
|
|
||||||
my $library = $builder->build_object ({ class => 'Koha::Libraries' });
|
my $library = $builder->build_object( { class => 'Koha::Libraries' } );
|
||||||
my $patron = $builder->build_object(
|
my $patron = $builder->build_object(
|
||||||
{
|
{
|
||||||
class => 'Koha::Patrons',
|
class => 'Koha::Patrons',
|
||||||
value => {
|
value => {
|
||||||
|
@ -327,17 +327,19 @@ subtest renew => sub {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
t::lib::Mocks::mock_userenv({ branchcode => $library->branchcode });
|
t::lib::Mocks::mock_userenv( { branchcode => $library->branchcode } );
|
||||||
|
|
||||||
my $item = $builder->build_sample_item({
|
my $item = $builder->build_sample_item(
|
||||||
library => $library->branchcode,
|
{
|
||||||
});
|
library => $library->branchcode,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
AddIssue( $patron->unblessed, $item->barcode, undef, 0 );
|
AddIssue( $patron->unblessed, $item->barcode, undef, 0 );
|
||||||
my $checkout = $item->checkout;
|
my $checkout = $item->checkout;
|
||||||
ok( defined($checkout), "Successfully checked out an item prior to renewal");
|
ok( defined($checkout), "Successfully checked out an item prior to renewal" );
|
||||||
|
|
||||||
my $ils = C4::SIP::ILS->new({ id => $library->branchcode });
|
my $ils = C4::SIP::ILS->new( { id => $library->branchcode } );
|
||||||
|
|
||||||
my $transaction = $ils->renew( $patron->cardnumber, "", $item->barcode );
|
my $transaction = $ils->renew( $patron->cardnumber, "", $item->barcode );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue