View | Details | Raw Unified | Return to bug 27842
Collapse All | Expand All

(-)a/t/db_dependent/Serials.t (-3 / +23 lines)
Lines 419-426 subtest "PreserveSerialNotes preference" => sub { Link Here
419
419
420
};
420
};
421
421
422
subtest "NewSubscription" => sub {
422
subtest "NewSubscription|ModSubscription" => sub {
423
    plan tests => 1;
423
    plan tests => 4;
424
    my $subscriptionid = NewSubscription(
424
    my $subscriptionid = NewSubscription(
425
        "",      "",     "", "", $budget_id, $biblionumber,
425
        "",      "",     "", "", $budget_id, $biblionumber,
426
        '2013-01-01', $frequency_id, "", "",  "",
426
        '2013-01-01', $frequency_id, "", "",  "",
Lines 430-433 subtest "NewSubscription" => sub { Link Here
430
        "", "", 0,          "",         '2013-12-31', 0
430
        "", "", 0,          "",         '2013-12-31', 0
431
    );
431
    );
432
    ok($subscriptionid, "Sending empty string instead of undef to reflect use of the interface");
432
    ok($subscriptionid, "Sending empty string instead of undef to reflect use of the interface");
433
434
    my $subscription = Koha::Subscriptions->find($subscriptionid);
435
    my $serials = Koha::Serials->search({ subscriptionid => $subscriptionid });
436
    is( $serials->count, 1, "NewSubscription created a first serial" );
437
438
    my $biblio_2 = $builder->build_sample_biblio;
439
    my $subscription_info = $subscription->unblessed;
440
    $subscription_info->{biblionumber} = $biblio_2->biblionumber;
441
    ModSubscription( @$subscription_info{qw(
442
        librarian branchcode aqbooksellerid cost aqbudgetid startdate
443
        periodicity firstacquidate irregularity numberpattern locale
444
        numberlength weeklength monthlength lastvalue1 innerloop1 lastvalue2
445
        innerloop2 lastvalue3 innerloop3 status biblionumber callnumber notes
446
        letter manualhistory internalnotes serialsadditems staffdisplaycount
447
        opacdisplaycount graceperiod location enddate subscriptionid
448
        skip_serialseq
449
    )} );
450
451
    $serials = Koha::Serials->search({ subscriptionid => $subscriptionid });
452
    is( $serials->count, 1, "Still only one serial" );
453
    is( $serials->next->biblionumber, $biblio_2->biblionumber, 'ModSubscription should have updated serial.biblionumber');
433
};
454
};
434
- 

Return to bug 27842