Lines 212-219
isnt( $alert_id, undef, 'addalert does not return undef' );
Link Here
|
212 |
|
212 |
|
213 |
|
213 |
|
214 |
# getalert |
214 |
# getalert |
215 |
my $alerts = C4::Letters::getalert(); |
215 |
my $alerts; |
216 |
is( @$alerts, 1, 'addalert should not fail without parameter' ); |
216 |
eval { |
|
|
217 |
$alerts = C4::Letters::getalert(); |
218 |
is( @$alerts, 1, 'getalert should not fail without parameter' ); |
219 |
} || fail('getalert failed horribly without a parameter'); |
217 |
$alerts = C4::Letters::getalert($borrowernumber); |
220 |
$alerts = C4::Letters::getalert($borrowernumber); |
218 |
is( @$alerts, 1, 'addalert adds an alert' ); |
221 |
is( @$alerts, 1, 'addalert adds an alert' ); |
219 |
is( $alerts->[0]->{alertid}, $alert_id, 'addalert returns the alert id correctly' ); |
222 |
is( $alerts->[0]->{alertid}, $alert_id, 'addalert returns the alert id correctly' ); |
220 |
- |
|
|