From 40b8bd8667e1e414fa50882b6dc1286a8ba77afb Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 29 Jun 2010 13:46:37 -0700 Subject: [PATCH] Fix this test, so that it will pass every day of every month. --- t/Workflow/Activity/ExtendCalendarRecurrences.t | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/t/Workflow/Activity/ExtendCalendarRecurrences.t b/t/Workflow/Activity/ExtendCalendarRecurrences.t index 098552655..9c1762b31 100644 --- a/t/Workflow/Activity/ExtendCalendarRecurrences.t +++ b/t/Workflow/Activity/ExtendCalendarRecurrences.t @@ -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', @@ -43,7 +45,7 @@ my $recurId = $event->setRecurrence( { recurType => 'monthDay', every => 2, startDate => $event->get('startDate'), - dayNumber => DateTime->today->day, + dayNumber => $eventStartDate->day, } );