Lines 1-17
Link Here
|
1 |
#!/usr/bin/perl |
1 |
#!/usr/bin/perl |
2 |
# |
|
|
3 |
# This Koha test module is a stub! |
4 |
# Add more tests here!!! |
5 |
|
2 |
|
6 |
use strict; |
3 |
use Modern::Perl; |
7 |
use warnings; |
|
|
8 |
|
4 |
|
9 |
use C4::Bookseller qw( GetBookSellerFromId ); |
5 |
use C4::Bookseller qw( GetBookSellerFromId ); |
10 |
use C4::Biblio qw( AddBiblio ); |
6 |
use C4::Biblio qw( AddBiblio ); |
11 |
|
7 |
|
12 |
use Koha::Acquisition::Order; |
8 |
use Koha::Acquisition::Order; |
13 |
|
9 |
|
14 |
use Test::More tests => 22; |
10 |
use Test::More tests => 24; |
15 |
|
11 |
|
16 |
BEGIN { |
12 |
BEGIN { |
17 |
use_ok('C4::Acquisition'); |
13 |
use_ok('C4::Acquisition'); |
Lines 134-139
my $invoice2 = GetInvoiceDetails($invoiceid2);
Link Here
|
134 |
is(scalar @{$invoice1->{'orders'}}, 1, 'Invoice1 has only one order'); |
130 |
is(scalar @{$invoice1->{'orders'}}, 1, 'Invoice1 has only one order'); |
135 |
is(scalar @{$invoice2->{'orders'}}, 2, 'Invoice2 has only two orders'); |
131 |
is(scalar @{$invoice2->{'orders'}}, 2, 'Invoice2 has only two orders'); |
136 |
|
132 |
|
|
|
133 |
my $orders = $invoice1->{orders}; |
134 |
ok( exists( @$orders[0]->{basketgroupid} ), "GetInvoiceDetails: The basketgroupid key exists" ); |
135 |
ok( exists( @$orders[0]->{basketgroupname} ), "GetInvoiceDetails: The basketgroupname key exists" ); |
136 |
|
137 |
my @invoices = GetInvoices(); |
137 |
my @invoices = GetInvoices(); |
138 |
cmp_ok(scalar @invoices, '>=', 2, 'GetInvoices returns at least two invoices'); |
138 |
cmp_ok(scalar @invoices, '>=', 2, 'GetInvoices returns at least two invoices'); |
139 |
|
139 |
|
140 |
- |
|
|