Bug 36506: Adjust existing tests and test builder
All the previously written tests should continue to pass. Sponsored-by: The Main Library Alliance <https://www.mainlib.org/> Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
2b5f89788d
commit
cd0462b4c6
|
|
@ -607,7 +607,6 @@ subtest "C4::Accounts::chargelostitem tests" => sub {
|
|||
value => {
|
||||
rentalcharge => 0,
|
||||
defaultreplacecost => undef,
|
||||
processfee => undef,
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
@ -617,7 +616,6 @@ subtest "C4::Accounts::chargelostitem tests" => sub {
|
|||
value => {
|
||||
rentalcharge => 0,
|
||||
defaultreplacecost => 16.32,
|
||||
processfee => undef,
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
@ -627,7 +625,6 @@ subtest "C4::Accounts::chargelostitem tests" => sub {
|
|||
value => {
|
||||
rentalcharge => 0,
|
||||
defaultreplacecost => undef,
|
||||
processfee => 8.16,
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
@ -637,10 +634,21 @@ subtest "C4::Accounts::chargelostitem tests" => sub {
|
|||
value => {
|
||||
rentalcharge => 0,
|
||||
defaultreplacecost => 4.08,
|
||||
processfee => 2.04,
|
||||
}
|
||||
}
|
||||
);
|
||||
my $one_rule = Koha::CirculationRules->set_rule(
|
||||
{
|
||||
itemtype => $itype_no_replace_fee->{itemtype}, branchcode => undef, rule_value => 8.16,
|
||||
rule_name => 'lost_item_processing_fee'
|
||||
}
|
||||
);
|
||||
my $two_rule = Koha::CirculationRules->set_rule(
|
||||
{
|
||||
itemtype => $itype_replace_fee->{itemtype}, branchcode => undef, rule_value => 2.04,
|
||||
rule_name => 'lost_item_processing_fee'
|
||||
}
|
||||
);
|
||||
my $cli_borrowernumber = $builder->build( { source => 'Borrower' } )->{'borrowernumber'};
|
||||
my $cli_itemnumber1 = $builder->build_sample_item( { itype => $itype_no_replace_no_fee->{itemtype} } )->itemnumber;
|
||||
my $cli_itemnumber2 = $builder->build_sample_item( { itype => $itype_replace_no_fee->{itemtype} } )->itemnumber;
|
||||
|
|
|
|||
|
|
@ -156,7 +156,6 @@ my $itemtype = $builder->build(
|
|||
rentalcharge => 0,
|
||||
rentalcharge_daily => 0,
|
||||
defaultreplacecost => undef,
|
||||
processfee => undef
|
||||
}
|
||||
}
|
||||
)->{itemtype};
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@ my $itemtype = $builder->build_object(
|
|||
rentalcharge_hourly => '0.00',
|
||||
rentalcharge_hourly_calendar => 1,
|
||||
rentalcharge => '0.00',
|
||||
processfee => '0.00',
|
||||
defaultreplacecost => '0.00',
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -465,11 +465,16 @@ subtest 'store' => sub {
|
|||
notforloan => 0,
|
||||
rentalcharge => 0,
|
||||
defaultreplacecost => undef,
|
||||
processfee => $processfee_amount,
|
||||
rentalcharge_daily => 0,
|
||||
}
|
||||
}
|
||||
);
|
||||
Koha::CirculationRules->set_rule(
|
||||
{
|
||||
itemtype => $item_type->itemtype, branchcode => undef, rule_value => $processfee_amount,
|
||||
rule_name => 'lost_item_processing_fee'
|
||||
}
|
||||
);
|
||||
my $library = $builder->build_object( { class => 'Koha::Libraries' } );
|
||||
|
||||
$biblio = $builder->build_sample_biblio( { author => 'Hall, Daria' } );
|
||||
|
|
@ -1048,7 +1053,6 @@ subtest 'store' => sub {
|
|||
notforloan => 0,
|
||||
rentalcharge => 0,
|
||||
defaultreplacecost => undef,
|
||||
processfee => 0,
|
||||
rentalcharge_daily => 0,
|
||||
}
|
||||
}
|
||||
|
|
@ -1166,7 +1170,6 @@ subtest 'store' => sub {
|
|||
my $patron = $builder->build_object( { class => 'Koha::Patrons' } );
|
||||
my $barcode = 'KD123456794';
|
||||
my $replacement_amount = 100;
|
||||
my $processfee_amount = 20;
|
||||
|
||||
my $item_type = $builder->build_object(
|
||||
{
|
||||
|
|
@ -1175,7 +1178,6 @@ subtest 'store' => sub {
|
|||
notforloan => 0,
|
||||
rentalcharge => 0,
|
||||
defaultreplacecost => undef,
|
||||
processfee => 0,
|
||||
rentalcharge_daily => 0,
|
||||
}
|
||||
}
|
||||
|
|
@ -1579,7 +1581,6 @@ subtest 'store' => sub {
|
|||
my $patron = $builder->build_object( { class => 'Koha::Patrons' } );
|
||||
my $barcode = 'KD123456795';
|
||||
my $replacement_amount = 100;
|
||||
my $processfee_amount = 20;
|
||||
|
||||
my $item_type = $builder->build_object(
|
||||
{
|
||||
|
|
@ -1588,7 +1589,6 @@ subtest 'store' => sub {
|
|||
notforloan => 0,
|
||||
rentalcharge => 0,
|
||||
defaultreplacecost => undef,
|
||||
processfee => 0,
|
||||
rentalcharge_daily => 0,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,6 @@ subtest 'list() tests' => sub {
|
|||
rentalcharge_hourly => 0.60,
|
||||
rentalcharge_hourly_calendar => 1,
|
||||
defaultreplacecost => 1000.0,
|
||||
processfee => 20.0,
|
||||
notforloan => 0,
|
||||
imageurl => 'https://upload.wikimedia.org/wikipedia/commons/1/1f/202208_test-tube-4.svg',
|
||||
summary => 'An item type for testing',
|
||||
|
|
|
|||
|
|
@ -682,7 +682,6 @@ sub _gen_default_values {
|
|||
rentalcharge_daily => 0,
|
||||
rentalcharge_hourly => 0,
|
||||
defaultreplacecost => 0,
|
||||
processfee => 0,
|
||||
notforloan => 0,
|
||||
bookable => 0,
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue