<<

create_overdue_item

sub run_overduenotices_script : Test( 1 ) { my $self = shift;

    # make sure member wants alerts
    C4::Members::Attributes::UpdateBorrowerAttribute($self->{'memberid'},
                                                     { code  => 'PREDEmail',
                                                       value => '1' } );
    
    # we're screwing with C4::Circulation::GetUpcomingIssues by passing in a negative number.
    C4::Members::Attributes::UpdateBorrowerAttribute($self->{'memberid'},
                                                     { code  => 'PREDDAYS',
                                                       value => '-6' } );
    
    
    my $before_count = $self->count_message_queue();

    my $output = qx( ../misc/cronjobs/advance_notices.pl -c );
    
    my $after_count = $self->count_message_queue();
    is( $after_count, $before_count + 1, 'there is one more message in the queue than there used to be.' )
      or diag $output;

}

<<