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

(-)a/t/db_dependent/Serials.t (-6 / +14 lines)
Lines 15-21 use C4::Bookseller; Link Here
15
use C4::Biblio;
15
use C4::Biblio;
16
use C4::Budgets;
16
use C4::Budgets;
17
use Koha::DateUtils;
17
use Koha::DateUtils;
18
use Test::More tests => 43;
18
use Test::More tests => 47;
19
19
20
BEGIN {
20
BEGIN {
21
    use_ok('C4::Serials');
21
    use_ok('C4::Serials');
Lines 65-81 my $pattern_id = AddSubscriptionNumberpattern({ Link Here
65
    whenmorethan1 => 1,
65
    whenmorethan1 => 1,
66
});
66
});
67
67
68
my $notes = 'notes';
69
my $internalnotes = 'intnotes';
68
my $subscriptionid = NewSubscription(
70
my $subscriptionid = NewSubscription(
69
    undef,      "",     undef, undef, $budget_id, $biblionumber,
71
    undef,      "",     undef, undef, $budget_id, $biblionumber,
70
    '2013-01-01', $frequency_id, undef, undef,  undef,
72
    '2013-01-01', $frequency_id, undef, undef,  undef,
71
    undef,      undef,  undef, undef, undef, undef,
73
    undef,      undef,  undef, undef, undef, undef,
72
    1,          "notes",undef, '2013-01-01', undef, $pattern_id,
74
    1,          $notes,undef, '2013-01-01', undef, $pattern_id,
73
    undef,       undef,  0,    "intnotes",  0,
75
    undef,       undef,  0,    $internalnotes,  0,
74
    undef, undef, 0,          undef,         '2013-12-31', 0
76
    undef, undef, 0,          undef,         '2013-12-31', 0
75
);
77
);
76
78
77
my $subscriptioninformation = GetSubscription( $subscriptionid );
79
my $subscriptioninformation = GetSubscription( $subscriptionid );
78
80
81
is( $subscriptioninformation->{notes}, $notes, 'NewSubscription should set notes' );
82
is( $subscriptioninformation->{internalnotes}, $internalnotes, 'NewSubscription should set internalnotes' );
83
84
my $subscription_history = C4::Serials::GetSubscriptionHistoryFromSubscriptionId($subscriptionid);
85
is( $subscription_history->{opacnote}, '', 'NewSubscription should not set subscriptionhistory opacnotes' );
86
is( $subscription_history->{librariannote}, '', 'NewSubscription should not set subscriptionhistory librariannotes' );
87
79
my @subscriptions = GetSubscriptions( $$subscriptioninformation{bibliotitle} );
88
my @subscriptions = GetSubscriptions( $$subscriptioninformation{bibliotitle} );
80
isa_ok( \@subscriptions, 'ARRAY' );
89
isa_ok( \@subscriptions, 'ARRAY' );
81
90
Lines 189-196 $subscriptionid = NewSubscription( Link Here
189
    undef,      "",     undef, undef, $budget_id, $biblionumber,
198
    undef,      "",     undef, undef, $budget_id, $biblionumber,
190
    '2013-01-01', $frequency_id, undef, undef,  undef,
199
    '2013-01-01', $frequency_id, undef, undef,  undef,
191
    undef,      undef,  undef, undef, undef, undef,
200
    undef,      undef,  undef, undef, undef, undef,
192
    1,          "notes",undef, '2013-01-01', undef, $pattern_id,
201
    1,          $notes,undef, '2013-01-01', undef, $pattern_id,
193
    undef,       undef,  0,    "intnotes",  0,
202
    undef,       undef,  0,    $internalnotes,  0,
194
    undef, undef, 0,          undef,         '2013-12-31', 0
203
    undef, undef, 0,          undef,         '2013-12-31', 0
195
);
204
);
196
my $total_issues;
205
my $total_issues;
197
- 

Return to bug 13746