[Bps-public-commit] net-lighthouse branch, master, updated. a64af316d58834011f6cbd0770c3daf15b744129

sunnavy at bestpractical.com sunnavy at bestpractical.com
Mon Aug 31 01:56:50 EDT 2009


The branch, master has been updated
       via  a64af316d58834011f6cbd0770c3daf15b744129 (commit)
      from  562e8ca6660a1c1e20de5c3d8cf36971a2a05a69 (commit)

Summary of changes:
 t/04-ticket-version.t |   38 +++++++++++++++++++++++++-------------
 1 files changed, 25 insertions(+), 13 deletions(-)

- Log -----------------------------------------------------------------
commit a64af316d58834011f6cbd0770c3daf15b744129
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Mon Aug 31 13:56:40 2009 +0800

    updated t/04-ticket-version.t

diff --git a/t/04-ticket-version.t b/t/04-ticket-version.t
index 497b57c..b6a0dea 100644
--- a/t/04-ticket-version.t
+++ b/t/04-ticket-version.t
@@ -38,31 +38,43 @@ my $v1 = $version->load_from_xml($xml);
 is( $v1, $version, 'load return $self' );
 
 my %hash = (
-    'number'            => '1',
+    'number'            => 1,
     'state'             => 'new',
     'permalink'         => 'first-ticket',
     'milestone_id'      => undef,
     'body'              => 'this\'s 1st description',
-    'assigned_user_id'  => '67166',
-    'attachments_count' => '0',
-    'created_at'        => '2009-08-21T11:15:50Z',
+    'assigned_user_id'  => 67166,
+    'attachments_count' => 0,
+    'created_at' => DateTime->new(
+        year   => 2009,
+        month  => 8,
+        day    => 21,
+        hour   => 11,
+        minute => 15,
+        second => 50,
+    ),
     'url'        => 'http://sunnavy.lighthouseapp.com/projects/35918/tickets/1',
     'tag'        => 'first',
-    'project_id' => '35918',
-    'creator_id' => '67166',
+    'project_id' => 35918,
+    'creator_id' => 67166,
     'creator_name'        => 'sunnavy (at gmail)',
-    'closed'              => 'false',
+    'closed'              => 0,
     'user_name'           => 'sunnavy (at gmail)',
-    'diffable_attributes' => '--- {}
-
-',
-    'updated_at'         => '2009-08-21T11:15:53Z',
+    'diffable_attributes' => {},
+    'updated_at'         => DateTime->new( 
+        year   => 2009,
+        month  => 8,
+        day    => 21,
+        hour   => 11,
+        minute => 15,
+        second => 53,
+    ),
     'body_html'          => '<div><p>this\'s 1st description</p></div>',
-    'user_id'            => '67166',
+    'user_id'            => 67166,
     'assigned_user_name' => 'sunnavy (at gmail)',
     'title'              => 'first ticket'
 );
 
 for my $k ( keys %hash ) {
-    is( $v1->$k, $hash{$k}, "$k is loaded" );
+    is_deeply( $v1->$k, $hash{$k}, "$k is loaded" );
 }

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



More information about the Bps-public-commit mailing list