Skip to content

Commit

Permalink
Fix this test, so that it will pass every day of every month.
Browse files Browse the repository at this point in the history
  • Loading branch information
perlDreamer committed Jun 29, 2010
1 parent 5b5c100 commit 40b8bd8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions t/Workflow/Activity/ExtendCalendarRecurrences.t
Expand Up @@ -30,7 +30,9 @@ my $calendar = $temp->addChild(
{ className => 'WebGUI::Asset::Wobject::Calendar' }
);

my $one_year_ago = DateTime->today->subtract(years => 1)->ymd;
my $eventStartDate = DateTime->today->truncate(to => 'month')->subtract(years => 1);

my $one_year_ago = $eventStartDate->ymd;

my $event = $calendar->addChild(
{ className => 'WebGUI::Asset::Event',
Expand All @@ -43,7 +45,7 @@ my $recurId = $event->setRecurrence(
{ recurType => 'monthDay',
every => 2,
startDate => $event->get('startDate'),
dayNumber => DateTime->today->day,
dayNumber => $eventStartDate->day,
}
);

Expand Down

0 comments on commit 40b8bd8

Please sign in to comment.