[Rt-commit] rt branch, master, updated. rt-4.1.8-568-g4cf1793

Alex Vandiver alexmv at bestpractical.com
Mon Jun 10 14:21:09 EDT 2013


The branch, master has been updated
       via  4cf179385d9585bdb1ec67d4ebb22d6a369e63f9 (commit)
      from  4ccb7d7385abee1430888d29d45e35e7be2d6e08 (commit)

Summary of changes:
 t/web/search_ical.t | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit 4cf179385d9585bdb1ec67d4ebb22d6a369e63f9
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Fri Jun 7 00:23:12 2013 -0400

    Adjust tests to compare to root's definition of today (in EST), not UTC's
    
    89a48e0 adjusted the iCal feed to use the user's definition of "today"
    instead of UTC's, causing the test to fail when run between the hours of
    9pm and midnight EST.

diff --git a/t/web/search_ical.t b/t/web/search_ical.t
index 30700ca..094d8a2 100644
--- a/t/web/search_ical.t
+++ b/t/web/search_ical.t
@@ -58,13 +58,17 @@ diag 'Test iCal with date only';
     is( $ical_count, 10, "Got $ical_count ical entries");
 
     my $prop_ref = $entries[0]->[0]->properties;
-    my $start = $start_obj->ISO( Time => 0);
+    my $start_as_root = RT::Date->new( RT::CurrentUser->new( 'root' ) );
+    $start_as_root->Unix( $start_obj->Unix );
+    my $start = $start_as_root->ISO( Time => 0, Timezone => 'user' );
     $start =~ s/-//g;
     is($prop_ref->{'dtstart'}->[0]->value, $start, "Got start date: $start");
     like( $prop_ref->{'dtstart'}->[0]->as_string, qr/VALUE=DATE\:/, 'Got DATE value');
 
     $prop_ref = $entries[0]->[1]->properties;
-    my $due = $due_obj->ISO( Time => 0);
+    my $due_as_root = RT::Date->new( RT::CurrentUser->new( 'root' ) );
+    $due_as_root->Unix( $due_obj->Unix );
+    my $due = $due_as_root->ISO( Time => 0, Timezone => 'user' );
     $due =~ s/-//g;
     is($prop_ref->{'dtend'}->[0]->value, $due, "Got due date: $due");
     like( $prop_ref->{'dtend'}->[0]->as_string, qr/VALUE=DATE\:/, 'Got DATE value');

-----------------------------------------------------------------------


More information about the Rt-commit mailing list