"Fossies" - the Fresh Open Source Software Archive

Member "email-reminder-0.8.1/t/new-events.t" (14 Mar 2015, 1180 Bytes) of package /linux/privat/email-reminder-0.8.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Perl source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/usr/bin/perl
    2 
    3 use strict;
    4 use warnings;
    5 
    6 use Test::More tests => 10;
    7 
    8 use Date::Manip;
    9 use EmailReminder::EventList;
   10 use EmailReminder::Event;
   11 
   12 # load the data in
   13 my $er = EmailReminder::EventList->new('t/empty.xml', 1);
   14 
   15 my $event;
   16 
   17 $event = $er->create_event('monthly');
   18 $event->set_name('New Monthly');
   19 is("$event", "monthly:0) New Monthly - 1", 'new monthy');
   20 is($event->get_nb_fields(), 3, 'monthly fields');
   21 
   22 $event = $er->create_event('weekly');
   23 $event->set_name('New Weekly');
   24 is("$event", "weekly:1) New Weekly - 7", 'new weekly');
   25 is($event->get_nb_fields(), 3, 'weekly fields');
   26 
   27 $event = $er->create_event('birthday');
   28 $event->set_name('New Birthday');
   29 is("$event", "birthday:2) New Birthday - 01-01", 'new birthday');
   30 is($event->get_nb_fields(), 4, 'birthday fields');
   31 
   32 $event = $er->create_event('anniversary');
   33 $event->set_name('New Anniversary');
   34 is("$event", "anniversary:3) New Anniversary and  - 01-01", 'new anniversary');
   35 is($event->get_nb_fields(), 6, 'anniversary fields');
   36 
   37 $event = $er->create_event('yearly');
   38 $event->set_name('New Yearly');
   39 is("$event", "yearly:4) New Yearly - 01-01", 'new yearly');
   40 is($event->get_nb_fields(), 3, 'yearly fields');