Bug 24277: Regression tests
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit 76f7c46613)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
f633d841b2
commit
b57a0462ec
|
|
@ -19,9 +19,10 @@ use Modern::Perl;
|
|||
|
||||
use POSIX qw(strftime);
|
||||
|
||||
use Test::More tests => 77;
|
||||
use Test::More tests => 78;
|
||||
use t::lib::Mocks;
|
||||
use Koha::Database;
|
||||
use Koha::DateUtils qw(dt_from_string output_pref);
|
||||
use Koha::Acquisition::Basket;
|
||||
|
||||
use MARC::File::XML ( BinaryEncoding => 'utf8', RecordFormat => 'MARC21' );
|
||||
|
|
@ -304,16 +305,36 @@ my $invoiceid = AddInvoice(
|
|||
|
||||
my $invoice = GetInvoice( $invoiceid );
|
||||
|
||||
my $reception_date = output_pref(
|
||||
{
|
||||
dt => dt_from_string->add( days => 1 ),
|
||||
dateformat => 'iso',
|
||||
dateonly => 1,
|
||||
}
|
||||
);
|
||||
my ($datereceived, $new_ordernumber) = ModReceiveOrder(
|
||||
{
|
||||
biblionumber => $biblionumber4,
|
||||
order => Koha::Acquisition::Orders->find( $ordernumbers[4] )->unblessed,
|
||||
quantityreceived => 1,
|
||||
invoice => $invoice,
|
||||
budget_id => $order_content[4]->{str}->{budget_id},
|
||||
budget_id => $order_content[4]->{str}->{budget_id},
|
||||
datereceived => $reception_date,
|
||||
}
|
||||
);
|
||||
|
||||
is(
|
||||
output_pref(
|
||||
{
|
||||
dt => dt_from_string($datereceived),
|
||||
dateformat => 'iso',
|
||||
dateonly => 1
|
||||
}
|
||||
),
|
||||
$reception_date,
|
||||
'ModReceiveOrder sets the passed date'
|
||||
);
|
||||
|
||||
my $search_orders = SearchOrders({
|
||||
booksellerid => $booksellerid,
|
||||
basketno => $basketno
|
||||
|
|
|
|||
Loading…
Reference in New Issue