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

(-)a/t/db_dependent/Serials/Claims.t (-2 / +9 lines)
Lines 1-5 Link Here
1
use Modern::Perl;
1
use Modern::Perl;
2
use Test::More tests => 17;
2
use Test::More tests => 20;
3
3
4
use C4::Acquisition;
4
use C4::Acquisition;
5
use C4::Budgets;
5
use C4::Budgets;
Lines 122-127 my $subscriptionid_inlate3 = NewSubscription( Link Here
122
    undef, undef, 0,          undef,         '2013-12-31', 0
122
    undef, undef, 0,          undef,         '2013-12-31', 0
123
);
123
);
124
124
125
my $bibissn = '123456789';
126
my $biblioitem = Koha::Biblioitems->find({ 'biblionumber' => $biblionumber });
127
$biblioitem->set({ issn => $bibissn })->store;
125
128
126
$supplierlist = GetSuppliersWithLateIssues();
129
$supplierlist = GetSuppliersWithLateIssues();
127
is ( scalar(@$supplierlist), 2, '2 suppliers should have issues in late');
130
is ( scalar(@$supplierlist), 2, '2 suppliers should have issues in late');
Lines 130-135 is( GetLateOrMissingIssues(), undef, 'GetLateOrMissingIssues should return undef Link Here
130
133
131
my @late_or_missing_issues = GetLateOrMissingIssues( $supplier_id1 );
134
my @late_or_missing_issues = GetLateOrMissingIssues( $supplier_id1 );
132
is( scalar(@late_or_missing_issues), 1, 'supplier 1 should have 1 issue in late' );
135
is( scalar(@late_or_missing_issues), 1, 'supplier 1 should have 1 issue in late' );
136
is( $late_or_missing_issues[0]->{issn}, $bibissn, 'return of GetLateOrMissingIssues() contains biblioitems.issn');
133
137
134
@late_or_missing_issues = GetLateOrMissingIssues( $supplier_id2);
138
@late_or_missing_issues = GetLateOrMissingIssues( $supplier_id2);
135
is( scalar(@late_or_missing_issues), 2, 'supplier 2 should have 2 issues in late' );
139
is( scalar(@late_or_missing_issues), 2, 'supplier 2 should have 2 issues in late' );
Lines 162-164 is( $serial_claimed->{claims_count}, 1, 'The serial should have been claimed' ); Link Here
162
my $today = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 });
166
my $today = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 });
163
# FIXME: This test should pass. The GetLateOrMissingIssues should not deal with date format!
167
# FIXME: This test should pass. The GetLateOrMissingIssues should not deal with date format!
164
#is( $serial_claimed->{claimdate}, $today, 'The serial should have been claimed today' );
168
#is( $serial_claimed->{claimdate}, $today, 'The serial should have been claimed today' );
165
- 
169
170
@late_or_missing_issues = GetLateOrMissingIssues( undef, $subscriptionid_inlate1 );
171
is( scalar(@late_or_missing_issues), 1, 'subscription 1 should have 1 issue in late' );
172
is( $late_or_missing_issues[0]->{issn}, $bibissn, 'return of GetLateOrMissingIssues() contains biblioitems.issn');

Return to bug 17703