|
Lines 6-12
Link Here
|
| 6 |
use Modern::Perl; |
6 |
use Modern::Perl; |
| 7 |
use YAML; |
7 |
use YAML; |
| 8 |
|
8 |
|
| 9 |
use CGI qw ( -utf8 ); |
|
|
| 10 |
use C4::Serials; |
9 |
use C4::Serials; |
| 11 |
use C4::Serials::Frequency; |
10 |
use C4::Serials::Frequency; |
| 12 |
use C4::Serials::Numberpattern; |
11 |
use C4::Serials::Numberpattern; |
|
Lines 16-24
use C4::Budgets;
Link Here
|
| 16 |
use C4::Items; |
15 |
use C4::Items; |
| 17 |
use Koha::DateUtils; |
16 |
use Koha::DateUtils; |
| 18 |
use Koha::Acquisition::Booksellers; |
17 |
use Koha::Acquisition::Booksellers; |
|
|
18 |
use Koha::Subscriptions; |
| 19 |
use Koha::AdditionalFields; |
| 19 |
use t::lib::Mocks; |
20 |
use t::lib::Mocks; |
| 20 |
use t::lib::TestBuilder; |
21 |
use t::lib::TestBuilder; |
| 21 |
use Test::More tests => 46; |
22 |
use Test::More tests => 47; |
| 22 |
|
23 |
|
| 23 |
BEGIN { |
24 |
BEGIN { |
| 24 |
use_ok('C4::Serials'); |
25 |
use_ok('C4::Serials'); |
|
Lines 348-353
subtest "Do not generate an expected if one already exists" => sub {
Link Here
|
| 348 |
is( @serialsByStatus, 1, "ModSerialStatus delete corectly serial expected and not create another if exists" ); |
349 |
is( @serialsByStatus, 1, "ModSerialStatus delete corectly serial expected and not create another if exists" ); |
| 349 |
}; |
350 |
}; |
| 350 |
|
351 |
|
|
|
352 |
subtest 'Addition fields for subscription' => sub { |
| 353 |
plan tests => 2; |
| 354 |
|
| 355 |
is( ref($subscription->{additional_fields}), 'HASH'); # Could be a 'Koha::AdditionalFields! |
| 356 |
|
| 357 |
my $subscription_object = Koha::Subscriptions->find($subscriptionid); |
| 358 |
my $foo = Koha::AdditionalField->new({ |
| 359 |
tablename => 'subscription', |
| 360 |
name => 'subscription_foo', |
| 361 |
})->store; |
| 362 |
|
| 363 |
$subscription_object->set_additional_fields( |
| 364 |
[ |
| 365 |
{ |
| 366 |
id => $foo->id, |
| 367 |
value => 'foo value for subscription', |
| 368 |
} |
| 369 |
] |
| 370 |
); |
| 371 |
|
| 372 |
my $subscription = C4::Serials::GetSubscription($subscriptionid); |
| 373 |
is( ref($subscription->{additional_fields}), 'HASH', 'GetSubscription should build the additional fields'); # Could be a Koha::AdditionalFieldValues |
| 374 |
}; |
| 375 |
|
| 351 |
$dbh->rollback; |
376 |
$dbh->rollback; |
| 352 |
|
377 |
|
| 353 |
sub get_biblio { |
378 |
sub get_biblio { |
| 354 |
- |
|
|